Thank you for the report. Here's some previous discussion on the matter:
http://mail.gnu.org/archive/html/bug-fileutils/2003-01/msg00006.html rm fails to remove a symlink specified with a trailing slash because the unlink syscall also fails for such an argument. Making rm detect that condition earlier would not be hard, but would incur some cost -- cost to be borne by non-failing uses of rm. You might want to incur the cost only when prompting the user, but then that'd make rm behave differently with -i than without. The reason it used to work is because older versions of rm (prior to the rewrite for fileutils-4.1.9) improperly removed any trailing slashes. POSIX prohibits that. I admit that the diagnostics are contradictory, and I may well fix that some day, but it's not a high priority. Seemant Kulleen <[EMAIL PROTECTED]> wrote: > Currently in gentoo, we offer fileutils-4.1.11 and coreutils-4.5.10 (which is > currently masked for testing, and we are ready to replace the 3 utils with > coreutils, as soon as it goes stable according to GNU). > > The problem is a slight modification of one reported here: > > http://mail.gnu.org/archive/html/bug-fileutils/2003-01/msg00002.html > > Now, the results are as follows: > > [EMAIL PROTECTED] temp $ mkdir test > [EMAIL PROTECTED] temp $ touch test/testfile > [EMAIL PROTECTED] temp $ ln -s test test2 > [EMAIL PROTECTED] temp $ rm test2/ > rm: remove directory `test2/'? y > rm: cannot remove directory `test2/': Is a directory > [EMAIL PROTECTED] temp $ rmdir test2/ > rmdir: `test2/': Not a directory > [EMAIL PROTECTED] temp $ rm test2/ > rm: remove directory `test2/'? y > rm: cannot remove directory `test2/': Is a directory > [EMAIL PROTECTED] temp $ rm test2 > rm: remove symbolic link `test2'? y > > What gives? is it a directory or isn't it? :P > > Note, that a user pointed my attention to this in gentoo's bugzilla: > > http://bugs.gentoo.org/show_bug.cgi?id=17838 _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
