projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b645ebf
)
(prompt): Fix test for write-protectedness to also
author
Jim Meyering
<jim@meyering.net>
Thu, 4 Jul 2002 12:06:49 +0000
(12:06 +0000)
committer
Jim Meyering
<jim@meyering.net>
Thu, 4 Jul 2002 12:06:49 +0000
(12:06 +0000)
check errno == EACCES. Otherwise, `rm dangling-symlink' would
mistakenly prompt.
src/remove.c
patch
|
blob
|
history
diff --git
a/src/remove.c
b/src/remove.c
index bd1989f6c1e1f8264d08b573ab570eda8cc33cb6..394e4c48405fadafdf6dc531a714921a1273931e 100644
(file)
--- a/
src/remove.c
+++ b/
src/remove.c
@@
-560,7
+560,7
@@
prompt (char const *filename, struct rm_options const *x,
*is_dir = T_UNKNOWN;
if ((!x->ignore_missing_files && (x->interactive || x->stdin_tty)
- && (write_protected =
euidaccess (filename, W_OK
)))
+ && (write_protected =
(euidaccess (filename, W_OK) && errno == EACCES
)))
|| x->interactive)
{
struct stat sbuf;