commit | 934805aec1b666f347429324652f28af3206858d | [log] [tgz] |
---|---|---|
author | Glenn L McGrath <bug1@ihug.co.nz> | Fri Oct 18 23:59:40 2002 +0000 |
committer | Glenn L McGrath <bug1@ihug.co.nz> | Fri Oct 18 23:59:40 2002 +0000 |
tree | 57517e6c6d2724f9156f4fecc708520a8bb76ab0 | |
parent | 2a2ab1479ce87dee7982dc14d52cda06e982c861 [diff] |
Put bac kthe code that handles cases where a '-' wasnt specified prior to the options.
diff --git a/archival/tar.c b/archival/tar.c index dba6bbc..a34eb3c 100644 --- a/archival/tar.c +++ b/archival/tar.c
@@ -615,6 +615,14 @@ unsigned char tar_create = FALSE; #endif + /* Prepend '-' to the first argument if required */ + if (argv[1][0] != '-') { + char *tmp = xmalloc(strlen(argv[1]) + 2); + tmp[0] = '-'; + strcpy(tmp + 1, argv[1]); + argv[1] = tmp; + } + if (argc < 2) { show_usage(); }