diff options
author | Ondřej Vašík <ovasik@redhat.com> | 2013-10-11 17:07:37 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-10-11 17:07:37 +0100 |
commit | 743be23ed0c535ef69db8d2112874061ae3ec5b8 (patch) | |
tree | f994e67adf83eccd6830d64a384316566f7c44d5 /src/cp.c | |
parent | bae9c38410ca338d603ea4f62fb4ef177705d8ff (diff) | |
download | coreutils-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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: |