]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
copy: more-accurate warning about destruction
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 3 Aug 2017 20:44:53 +0000 (13:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 3 Aug 2017 20:46:36 +0000 (13:46 -0700)
* src/copy.c (copy_internal):
* tests/cp/backup-is-src.sh, tests/mv/backup-is-src.sh:
Say "might destroy", not "would destroy".

src/copy.c
tests/cp/backup-is-src.sh
tests/mv/backup-is-src.sh

index 9a30e16a8910a5bbf0939f5b889fe4d6896771e8..c4c574050b30dbe1cd71ae297adf7693ab5109e7 100644 (file)
@@ -2113,8 +2113,8 @@ copy_internal (char const *src_name, char const *dst_name,
                 {
                   const char *fmt;
                   fmt = (x->move_mode
-                 ? _("backing up %s would destroy source;  %s not moved")
-                 : _("backing up %s would destroy source;  %s not copied"));
+                 ? _("backing up %s might destroy source;  %s not moved")
+                 : _("backing up %s might destroy source;  %s not copied"));
                   error (0, 0, fmt,
                          quoteaf_n (0, dst_name),
                          quoteaf_n (1, src_name));
index 3e4a79f397867bdca4bca381e988e3e91d785c75..38c310fb2db9040911b98c29057c799e015f661d 100755 (executable)
@@ -28,7 +28,7 @@ cp --b=simple a~ a > out 2>&1 && fail=1
 sed "s,cp:,XXX:," out > out2
 
 cat > exp <<\EOF
-XXX: backing up 'a' would destroy source;  'a~' not copied
+XXX: backing up 'a' might destroy source;  'a~' not copied
 EOF
 
 compare exp out2 || fail=1
index 04e9f7c813049abbe73142f736f8e53a9c99c4b5..3d099cddbb1690349eee2bb220d5f771a87a20af 100755 (executable)
@@ -38,7 +38,7 @@ sed \
   out > out2
 
 cat > exp <<\EOF
-XXX: backing up 'YYY' would destroy source;  'ZZZ' not moved
+XXX: backing up 'YYY' might destroy source;  'ZZZ' not moved
 EOF
 
 compare exp out2 || fail=1