diff options
author | Jim Meyering <jim@meyering.net> | 2002-07-22 06:59:26 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-07-22 06:59:26 +0000 |
commit | db6dff2e6ede15f55e329eec6ec091aa1354bc52 (patch) | |
tree | f15a89ca998d193eaa2ce24c58c65a7e86353844 | |
parent | fc1b595b1944c5c648557d860f1249623ca37691 (diff) | |
download | coreutils-db6dff2e6ede15f55e329eec6ec091aa1354bc52.tar.xz |
rm would prompt for non-dangling symlinks
(prompt): When not interactive, don't prompt for a symlink.
-rw-r--r-- | src/remove.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/remove.c b/src/remove.c index 8fa482e05..59368ac09 100644 --- a/src/remove.c +++ b/src/remove.c @@ -574,7 +574,11 @@ prompt (char const *filename, struct rm_options const *x, /* Using permissions doesn't make sense for symlinks. */ if (S_ISLNK (sbuf.st_mode)) - write_protected = 0; + { + if ( ! x->interactive) + return RM_OK; + write_protected = 0; + } /* Issue the prompt. */ { |