]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(remove_file): Correct an expression to avoid making
authorJim Meyering <jim@meyering.net>
Mon, 22 Jan 2001 10:51:54 +0000 (10:51 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 22 Jan 2001 10:51:54 +0000 (10:51 +0000)
an unnecessary call to euidaccess for each file.

src/remove.c

index 4b1ab303310691e70041cdcee9f2f307d2a8f397..2e31323ab9f1d2e0b3812aa33e072399ae28ebb3 100644 (file)
@@ -1,5 +1,5 @@
 /* remove.c -- core functions for removing files and directories
-   Copyright (C) 88, 90, 91, 1994-2000 Free Software Foundation, Inc.
+   Copyright (C) 88, 90, 91, 1994-2001 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -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)))