summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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? "),