1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-16 12:22:01 +02:00

Fix a bug whereby cp would fail to parse an option like

--preserve=mode,ownership.

(decode_preserve_arg): Advance `comma' to
point the character following the comma.
This commit is contained in:
Jim Meyering
2002-12-11 23:44:23 +00:00
parent 990f8082fd
commit 7ba3e40970

View File

@@ -785,9 +785,9 @@ decode_preserve_arg (char const *arg, struct cp_options *x, int on_off)
char *comma = strchr (s, ',');
enum File_attribute val;
/* put a NUL in its place */
/* If we found a comma, put a NUL in its place and advance. */
if (comma)
*comma = 0;
*comma++ = 0;
/* process S. */
val = XARGMATCH ("--preserve", s, preserve_args, preserve_vals);