]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(copy_internal): Fix force and interactive tests.
authorJim Meyering <jim@meyering.net>
Fri, 12 May 2000 20:40:39 +0000 (20:40 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 12 May 2000 20:40:39 +0000 (20:40 +0000)
src/copy.c

index ad52c186d6eedb89bf8f11faa9942e010ba808d6..48b4d226824e6fd0ee7323ff8a41686c95a283aa 100644 (file)
@@ -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? "),