From: Jim Meyering Date: Mon, 22 Jul 2002 06:59:26 +0000 (+0000) Subject: rm would prompt for non-dangling symlinks X-Git-Tag: FILEUTILS-4_1_11~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db6dff2e6ede15f55e329eec6ec091aa1354bc52;p=thirdparty%2Fcoreutils.git rm would prompt for non-dangling symlinks (prompt): When not interactive, don't prompt for a symlink. --- diff --git a/src/remove.c b/src/remove.c index 8fa482e050..59368ac09a 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. */ {