From d80e851dc05f978dded84b7ac9fcae7066e3ffe0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 16 Nov 1999 00:46:00 +0000 Subject: Stuf --- mv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mv.c') 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) 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); -- cgit v1.2.3