From 57dd06703cb89ba53d05af95c11e89a2ca51af5c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 4 Sep 2012 14:40:11 +0200 Subject: rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir These commands would evoke an invalid diagnostic: $ mkdir d && ln -s d s && env rm -r s/ rm: cannot remove 's': Too many levels of symbolic links remove.c was stripping trailing slashes from "s/" before passing the name to "rm". But a trailing slash may change the semantics, and thus should not be stripped. * src/remove.c (rm_fts): Do not strip trailing slashes. * tests/rm/v-slash.sh: Adapt to new expected output. * gnulib: Update to latest, for an improved fts.c that merely normalizes trailing slashes. Reported by Paul Eggert in discussion of http://bugs.gnu.org/12339 --- tests/rm/v-slash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/rm/v-slash.sh b/tests/rm/v-slash.sh index 504f4ffb8..ec77bd063 100755 --- a/tests/rm/v-slash.sh +++ b/tests/rm/v-slash.sh @@ -26,7 +26,7 @@ touch a/x || framework_failure_ rm --verbose -r a/// > out || fail=1 cat <<\EOF > exp || fail=1 removed 'a/x' -removed directory: 'a' +removed directory: 'a/' EOF compare exp out || fail=1 -- cgit v1.2.3-54-g00ecf