summaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-10-18 23:59:40 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-10-18 23:59:40 +0000
commit934805aec1b666f347429324652f28af3206858d (patch)
tree57517e6c6d2724f9156f4fecc708520a8bb76ab0 /archival/tar.c
parent2a2ab1479ce87dee7982dc14d52cda06e982c861 (diff)
downloadbusybox-w32-934805aec1b666f347429324652f28af3206858d.tar.gz
busybox-w32-934805aec1b666f347429324652f28af3206858d.tar.bz2
busybox-w32-934805aec1b666f347429324652f28af3206858d.zip
Put bac kthe code that handles cases where a '-' wasnt specified prior to the options.
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c
index dba6bbcc4..a34eb3ca1 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -615,6 +615,14 @@ int tar_main(int argc, char **argv)
615 unsigned char tar_create = FALSE; 615 unsigned char tar_create = FALSE;
616#endif 616#endif
617 617
618 /* Prepend '-' to the first argument if required */
619 if (argv[1][0] != '-') {
620 char *tmp = xmalloc(strlen(argv[1]) + 2);
621 tmp[0] = '-';
622 strcpy(tmp + 1, argv[1]);
623 argv[1] = tmp;
624 }
625
618 if (argc < 2) { 626 if (argc < 2) {
619 show_usage(); 627 show_usage();
620 } 628 }