]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
cp: correct error message for invalid arguments of '--no-preserve'
authorOndřej Vašík <ovasik@redhat.com>
Fri, 11 Oct 2013 16:07:37 +0000 (17:07 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 11 Oct 2013 16:07:37 +0000 (17:07 +0100)
* src/cp.c (decode_preserve_arg):
Correct error message for invalid arguments of '--no-preserve'.
Reported by M.Vadkerti in http://bugzilla.redhat.com/1018206
Fixes http://bugs.gnu.org/15588

src/cp.c

index e235b326d4d45b82aadaccef6a2f95da7137c1aa..7bc8630fbc76570af54c21e3dafc4232a724722c 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -854,7 +854,8 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
         *comma++ = 0;
 
       /* process S.  */
-      val = XARGMATCH ("--preserve", s, preserve_args, preserve_vals);
+      val = XARGMATCH (on_off ? "--preserve" : "--no-preserve",
+                       s, preserve_args, preserve_vals);
       switch (val)
         {
         case PRESERVE_MODE: