aboutsummaryrefslogtreecommitdiff
path: root/mv.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-11-16 00:46:00 +0000
committerEric Andersen <andersen@codepoet.org>1999-11-16 00:46:00 +0000
commitd80e851dc05f978dded84b7ac9fcae7066e3ffe0 (patch)
tree9f32d236ce80a7a692f74fe1012df3bed6b19418 /mv.c
parenta9c95ea6551eb3d894fcc56822c8aa394972b699 (diff)
downloadbusybox-w32-d80e851dc05f978dded84b7ac9fcae7066e3ffe0.tar.gz
busybox-w32-d80e851dc05f978dded84b7ac9fcae7066e3ffe0.tar.bz2
busybox-w32-d80e851dc05f978dded84b7ac9fcae7066e3ffe0.zip
Stuf
Diffstat (limited to 'mv.c')
-rw-r--r--mv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mv.c b/mv.c
index b861ab7e6..2be3961ca 100644
--- a/mv.c
+++ b/mv.c
@@ -56,7 +56,7 @@ extern int mv_main(int argc, char **argv)
56 fprintf(stderr, "%s: not a directory\n", destName); 56 fprintf(stderr, "%s: not a directory\n", destName);
57 exit (FALSE); 57 exit (FALSE);
58 } 58 }
59 59
60 while (argc-- > 1) { 60 while (argc-- > 1) {
61 srcName = *(argv++); 61 srcName = *(argv++);
62 skipName = strrchr(srcName, '/'); 62 skipName = strrchr(srcName, '/');
@@ -67,6 +67,11 @@ extern int mv_main(int argc, char **argv)
67 strcat(newdestName, "/"); 67 strcat(newdestName, "/");
68 if ( skipName != NULL) 68 if ( skipName != NULL)
69 strcat(newdestName, strstr(srcName, skipName)); 69 strcat(newdestName, strstr(srcName, skipName));
70 else
71 strcat(newdestName, srcName);
72 fprintf(stderr, "srcName='%s'\n", srcName);
73 fprintf(stderr, "skipName='%s'\n", skipName);
74 fprintf(stderr, "newdestName='%s'\n", newdestName);
70 } 75 }
71 if (copyFile(srcName, newdestName, FALSE, FALSE) == FALSE) { 76 if (copyFile(srcName, newdestName, FALSE, FALSE) == FALSE) {
72 exit( FALSE); 77 exit( FALSE);