aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cp.c')
-rw-r--r--coreutils/cp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/cp.c b/coreutils/cp.c
index 76dc566b3..889e4604d 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -87,7 +87,7 @@ int cp_main(int argc, char **argv)
}
while (1) {
- dest = concat_path_file(last, bb_get_last_path_component(*argv));
+ dest = concat_path_file(last, bb_get_last_path_component_strip(*argv));
DO_COPY:
if (copy_file(*argv, dest, flags) < 0) {
status = 1;