diff options
author | Jim Meyering <jim@meyering.net> | 1996-09-05 23:19:33 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-09-05 23:19:33 +0000 |
commit | 63a48d0278c477af323a306197dd2c590f4960b4 (patch) | |
tree | 50638587535d99cb7727a7bb8b7c36e032a934d2 | |
parent | b8d66b170467c0901819cfcfa4f68258ea99df18 (diff) | |
download | coreutils-63a48d0278c477af323a306197dd2c590f4960b4.tar.xz |
(do_copy): When concatenating DEST (with a trailing `/') and the basename
part of non-directory SOURCE, don't add a slash between them.
-rw-r--r-- | src/cp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -529,9 +529,9 @@ do_copy (int argc, char **argv) strip_trailing_slashes (tmp_source); source_base = basename (tmp_source); - new_dest = (char *) alloca (strlen (dest) + 1 + - strlen (source_base) + 1); - stpcpy (stpcpy (stpcpy (new_dest, dest), "/"), source_base); + new_dest = (char *) alloca (strlen (dest) + + strlen (source_base) + 1); + stpcpy (stpcpy (new_dest, dest), source_base); } else { |