diff options
author | Jim Meyering <jim@meyering.net> | 2002-12-11 23:44:23 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-12-11 23:44:23 +0000 |
commit | 7ba3e40970f6c366abed4b21805ebb994c69966e (patch) | |
tree | 26274c8dd1f13abbaa0c0bfb732d9fca4c488e3b /src | |
parent | 990f8082fd89a1ef3b9c1da9c1d5b78d6aaca5ab (diff) | |
download | coreutils-7ba3e40970f6c366abed4b21805ebb994c69966e.tar.xz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/cp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |