coreutils/coreutils-cp-nopreserve-invalidargs.patch
Ondřej Vašík b975e77327 Various fixes backported from rawhide
- fix possible colorls.csh script errors for tcsh with
  noclobber set and entered include file (#1027279)
- cp: correct error message for invalid arguments
  of '--no-preserve' (#1018206)
- pr -e, with a mix of backspaces and TABs, could corrupt the heap
  in multibyte locales (analyzed by J.Koncicky)
- optimization of colorls scripts by Ville Skytta (#961012)
- cut - Fix the variables in multibyte path to work on 64 bit
2014-01-20 10:56:00 +01:00

29 lines
979 B
Diff

From 124ab798e65b6c95a8486f6f6af9bdf69b11e1bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ovasik@redhat.com>
Date: Fri, 11 Oct 2013 14:44:53 +0200
Subject: [PATCH] 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 rhbz #1018206
---
src/cp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/cp.c b/src/cp.c
index e235b32..7bc8630 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:
--
1.7.1