X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=e21a6466f40249ff530ffed978ebc053d43f6b8e;hb=ccdbafb2769c16a55565b387acea44a247001f6a;hp=92039dad235ec4e47d4144457afc4ec509b4d592;hpb=66e9b9cd6ce76dc56550ad5a2969d49ea1386b81;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index 92039da..e21a646 100644 --- a/src/tar.c +++ b/src/tar.c @@ -617,7 +617,7 @@ static struct argp_option options[] = { N_("exclude directories containing CACHEDIR.TAG"), GRID+1 }, {"exclude-tag", EXCLUDE_TAG_OPTION, N_("FILE"), 0, N_("exclude contents of directories containing FILE, except" - " for FILE itself"), GRID+1 }, + " for FILE itself"), GRID+1 }, {"exclude-tag-under", EXCLUDE_TAG_UNDER_OPTION, N_("FILE"), 0, N_("exclude everything under directories containing FILE"), GRID+1 }, {"exclude-tag-all", EXCLUDE_TAG_ALL_OPTION, N_("FILE"), 0, @@ -1178,11 +1178,11 @@ parse_opt (int key, char *arg, struct argp_state *state) switch (key) { - case ARGP_KEY_ARG: - /* File name or non-parsed option, because of ARGP_IN_ORDER */ - name_add_name (arg, MAKE_INCL_OPTIONS (args)); - args->input_files = true; - break; + case ARGP_KEY_ARG: + /* File name or non-parsed option, because of ARGP_IN_ORDER */ + name_add_name (arg, MAKE_INCL_OPTIONS (args)); + args->input_files = true; + break; case 'A': set_subcommand_option (CAT_SUBCOMMAND); @@ -1539,15 +1539,15 @@ parse_opt (int key, char *arg, struct argp_state *state) case EXCLUDE_TAG_OPTION: add_exclusion_tag (arg, exclusion_tag_contents, NULL); break; - + case EXCLUDE_TAG_UNDER_OPTION: add_exclusion_tag (arg, exclusion_tag_under, NULL); break; - + case EXCLUDE_TAG_ALL_OPTION: add_exclusion_tag (arg, exclusion_tag_all, NULL); break; - + case FORCE_LOCAL_OPTION: force_local_option = true; break; @@ -2302,9 +2302,6 @@ main (int argc, char **argv) /* Make sure we have first three descriptors available */ stdopen (); - /* Close all inherited open descriptors, except for the first three */ - closeopen (); - /* Pre-allocate a few structures. */ allocated_archive_names = 10; @@ -2322,6 +2319,7 @@ main (int argc, char **argv) /* Decode options. */ decode_options (argc, argv); + name_init (); /* Main command execution. */