From: Jim Meyering Date: Fri, 12 May 2000 20:40:39 +0000 (+0000) Subject: (copy_internal): Fix force and interactive tests. X-Git-Tag: FILEUTILS-4_0s~59 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=fc64ba37d4487df3133c1938e32e5e41ff896cd0;p=thirdparty%2Fcoreutils.git (copy_internal): Fix force and interactive tests. --- diff --git a/src/copy.c b/src/copy.c index ad52c186d6..48b4d22682 100644 --- a/src/copy.c +++ b/src/copy.c @@ -489,9 +489,9 @@ copy_internal (const char *src_path, const char *dst_path, return 0; } - if (!S_ISDIR (src_type) && !x->force && x->interactive) + if (!S_ISDIR (src_type) && x->interactive) { - if (euidaccess (dst_path, W_OK) != 0) + if (euidaccess (dst_path, W_OK) != 0 && x->force) { fprintf (stderr, _("%s: overwrite `%s', overriding mode %04lo? "),