From 743be23ed0c535ef69db8d2112874061ae3ec5b8 Mon Sep 17 00:00:00 2001 From: Ondřej Vašík Date: Fri, 11 Oct 2013 17:07:37 +0100 Subject: 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 --- src/cp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cp.c') 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: -- cgit v1.2.3-54-g00ecf