summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorOndřej Vašík <ovasik@redhat.com>2013-10-11 17:07:37 +0100
committerPádraig Brady <P@draigBrady.com>2013-10-11 17:07:37 +0100
commit743be23ed0c535ef69db8d2112874061ae3ec5b8 (patch)
treef994e67adf83eccd6830d64a384316566f7c44d5 /src/cp.c
parentbae9c38410ca338d603ea4f62fb4ef177705d8ff (diff)
downloadcoreutils-743be23ed0c535ef69db8d2112874061ae3ec5b8.tar.xz
cp: correct error message for invalid arguments of '--no-preserve'
* 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
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cp.c b/src/cp.c
index e235b326d..7bc8630fb 100644
--- 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: