summaryrefslogtreecommitdiff
path: root/src/copy.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-12 20:40:39 +0000
committerJim Meyering <jim@meyering.net>2000-05-12 20:40:39 +0000
commitfc64ba37d4487df3133c1938e32e5e41ff896cd0 (patch)
tree06edb77e44615c95cb3c8f781cc22858a206b627 /src/copy.c
parenta5c02a198b076ac94baf0a0ec3c1ffa25a12b47d (diff)
downloadcoreutils-fc64ba37d4487df3133c1938e32e5e41ff896cd0.tar.xz
(copy_internal): Fix force and interactive tests.
Diffstat (limited to 'src/copy.c')
-rw-r--r--src/copy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/copy.c b/src/copy.c
index ad52c186d..48b4d2268 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? "),