[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`cp --preserve=mode,timestamps ...' fails
From: |
TAKAI Kousuke |
Subject: |
`cp --preserve=mode,timestamps ...' fails |
Date: |
Wed, 11 Dec 2002 20:12:09 +0900 |
User-agent: |
T-gnus/6.15.6 (based on Oort Gnus v0.06) (revision 02) EMIKO/1.14.1 (Choanoflagellata) SLIM/1.14.8 (小 池栄子) APEL/10.3 Emacs/21.2 (sparc-sun-solaris2.6) MULE/5.0 (賢木) |
Hello,
I have found a slight bug in coreutils 4.5.3's `cp' command,
which will not recognize multiple arguments for one `--preserve'
option.
% ./cp --version
cp (coreutils) 4.5.3
[...]
% echo hello >file1
% ./cp --preserve=mode,timestamps file1 file2
./cp: ambiguous argument `' for `--preserve'
Valid arguments are:
- `mode'
- `timestamps'
- `ownership'
- `links'
- `all'
Try `./cp --help' for more information.
%
The following patch will correct this problem.
2002-12-11 TAKAI Kousuke <address@hidden>
* src/cp.c (decode_preserve_arg): Advance `comma' to
point the character next to the comma.
--- coreutils-4.5.3/src/cp.c.orig 2002-08-31 17:52:10.000000000 +0900
+++ coreutils-4.5.3/src/cp.c 2002-12-11 19:13:09.919213918 +0900
@@ -787,7 +787,7 @@ decode_preserve_arg (char const *arg, st
/* put a NUL in its place */
if (comma)
- *comma = 0;
+ *comma++ = 0;
/* process S. */
val = XARGMATCH ("--preserve", s, preserve_args, preserve_vals);
[patch ends here]
Sorry for my poor English.
--
TAKAI Kousuke <address@hidden>
Dept. of Communications and Computer Engineering,
Graduate School of Infomatics, Kyoto University, Japan
- `cp --preserve=mode,timestamps ...' fails,
TAKAI Kousuke <=