diff options
author | Jim Meyering <jim@meyering.net> | 2004-05-08 12:49:22 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-05-08 12:49:22 +0000 |
commit | 2e83808dd6db78feacef25035fcbadd7f05625c4 (patch) | |
tree | 9802d4fe244c08c74e88672cb4e724c27c318c47 /lib/save-cwd.c | |
parent | 198dc407d36fc14325d34d533939653719c64be6 (diff) | |
download | coreutils-2e83808dd6db78feacef25035fcbadd7f05625c4.tar.xz |
Fix bug where "rm" gave up too easily, reported by Dan Jacobsen in
<http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00013.html>.
(remove_entry): Check for errno values like ENOENT
that show the file cannot be directory, instead of for errno
values like EPERM that show the file might be a directory. This
is necessary because, when a single unlink() call has multiple
reasons to fail, it can set errno to any of those reasons; it's
only the rare errno value like ENOENT that excludes all the other
possible reasons to fail even when the file is a directory.
(remove_cwd_entries): Don't attempt chdir if the file is known
to not be a directory.
(remove_dir): Use the same method that remove_cwd_entries uses
(for some reason they differed). Don't assert that saved_errno
must be EPERM; it might be just about anything.
Diffstat (limited to 'lib/save-cwd.c')
0 files changed, 0 insertions, 0 deletions