From db6dff2e6ede15f55e329eec6ec091aa1354bc52 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 22 Jul 2002 06:59:26 +0000 Subject: rm would prompt for non-dangling symlinks (prompt): When not interactive, don't prompt for a symlink. --- src/remove.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. */ { -- cgit v1.2.3-54-g00ecf