X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=f4a36ccef908ce737ff15877509ad1434368d84e;hb=5da6733724fd03ead5a9e926e75c4db010d83024;hp=88aaaff007cf0f73c1baf29100cfd9d24329124d;hpb=1e3568d947425ad6c60c3a84c20ad94c1e70070a;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index 88aaaff..f4a36cc 100644 --- a/src/tar.c +++ b/src/tar.c @@ -281,6 +281,7 @@ enum OCCURRENCE_OPTION, OLD_ARCHIVE_OPTION, ONE_FILE_SYSTEM_OPTION, + OVERWRITE_DIR_OPTION, OVERWRITE_OPTION, OWNER_OPTION, PAX_OPTION, @@ -416,6 +417,9 @@ static struct argp_option options[] = { N_("empty hierarchies prior to extracting directory"), GRID+1 }, {"no-overwrite-dir", NO_OVERWRITE_DIR_OPTION, 0, 0, N_("preserve metadata of existing directories"), GRID+1 }, + {"overwrite-dir", OVERWRITE_DIR_OPTION, 0, 0, + N_("overwrite metadata of existing directories when extracting (default)"), + GRID+1 }, #undef GRID #define GRID 40 @@ -1521,6 +1525,10 @@ parse_opt (int key, char *arg, struct argp_state *state) } break; + case OVERWRITE_DIR_OPTION: + old_files_option = DEFAULT_OLD_FILES; + break; + case OVERWRITE_OPTION: old_files_option = OVERWRITE_OLD_FILES; break;