diff options
author | Eric Andersen | 1999-11-16 00:46:00 +0000 |
---|---|---|
committer | Eric Andersen | 1999-11-16 00:46:00 +0000 |
commit | d80e851dc05f978dded84b7ac9fcae7066e3ffe0 (patch) | |
tree | 9f32d236ce80a7a692f74fe1012df3bed6b19418 /coreutils/mv.c | |
parent | a9c95ea6551eb3d894fcc56822c8aa394972b699 (diff) | |
download | busybox-d80e851dc05f978dded84b7ac9fcae7066e3ffe0.zip busybox-d80e851dc05f978dded84b7ac9fcae7066e3ffe0.tar.gz |
Stuf
Diffstat (limited to 'coreutils/mv.c')
-rw-r--r-- | coreutils/mv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/coreutils/mv.c b/coreutils/mv.c index b861ab7..2be3961 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c @@ -56,7 +56,7 @@ extern int mv_main(int argc, char **argv) fprintf(stderr, "%s: not a directory\n", destName); exit (FALSE); } - + while (argc-- > 1) { srcName = *(argv++); skipName = strrchr(srcName, '/'); @@ -67,6 +67,11 @@ extern int mv_main(int argc, char **argv) strcat(newdestName, "/"); if ( skipName != NULL) strcat(newdestName, strstr(srcName, skipName)); + else + strcat(newdestName, srcName); + fprintf(stderr, "srcName='%s'\n", srcName); + fprintf(stderr, "skipName='%s'\n", skipName); + fprintf(stderr, "newdestName='%s'\n", newdestName); } if (copyFile(srcName, newdestName, FALSE, FALSE) == FALSE) { exit( FALSE); |