From: Jim Meyering Date: Sun, 18 Feb 2001 16:24:21 +0000 (+0000) Subject: `chmod 0 file; rm file' would no longer prompt before removal. X-Git-Tag: FILEUTILS-4_0_41~4 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=57e7dc4cda8fbc42385de1d648e20f6bfce5c0bf;p=thirdparty%2Fcoreutils.git `chmod 0 file; rm file' would no longer prompt before removal. (remove_file): Revert last change. --- diff --git a/src/remove.c b/src/remove.c index 2e31323ab9..0536893e7f 100644 --- a/src/remove.c +++ b/src/remove.c @@ -615,7 +615,7 @@ remove_file (struct File_spec *fs, const struct rm_options *x) int asked = 0; char *pathname = fs->filename; - if (!x->ignore_missing_files && x->interactive && x->stdin_tty + if (!x->ignore_missing_files && (x->interactive || x->stdin_tty) && euidaccess (pathname, W_OK)) { if (!S_ISLNK (fspec_filetype_mode (fs)))