Eric Blake <[EMAIL PROTECTED]> writes: > Shouldn't this also include ELOOP?
With ELOOP, we don't know whether the file exists. It could merely be a symlink chain that's too long. So it's safer for "rm" to print a diagnostic. This is in contrast with ENOTDIR, where we know for sure that the file does not exist. The POSIX spec is a bit weird here; it says to print a diagnostic if the file "does not exist". But suppose we lack permission to search the directory D, and the file D/F exists. Should "rm -f D/F" report a diagnostic? There's no way for "rm" to tell that D/F exists here, so there's no way to implement the POSIX spec as written. In this particular case GNU rm is cautious and prints a diagnostic; Solaris rm is lackadaisical and doesn't. I'd prefer GNU rm to be more cautious in this area, so I think it should print a diagnostic for ELOOP, as well as for EACCES. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
