1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-07 09:11:11 +02:00

(remove_file): Correct an expression to avoid making

an unnecessary call to euidaccess for each file.
This commit is contained in:
Jim Meyering
2001-01-22 10:51:54 +00:00
parent 37e38b4941
commit e673a685ac
+2 -2
View 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)))