]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rename: properly handle directories with trailing slash
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 4 Dec 2023 23:06:59 +0000 (00:06 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 4 Dec 2023 23:11:24 +0000 (00:11 +0100)
commit7b67193a53209907f84a6253dcf3aceaf2eb8da1
tree2e83a9454759dddd6247e33fd06b51f2b87a94df
parentaf0c6e12a24c281bb827ba59aba476b771f2db8d
rename: properly handle directories with trailing slash

Instead of hand-rolling a basename() function use the standard one which
provides the functionality that we want to use.

Also add a testcase.

Fixes #2569
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/rename.c
tests/expected/rename/basic
tests/ts/rename/basic