From ddab1f615ee03a8125614af124567c8271dcc1b2 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 4 Sep 2003 15:44:44 +0000 Subject: [PATCH] (extract_archive): Implemented --strip-path --- src/extract.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/extract.c b/src/extract.c index d6af621..d7aba0d 100644 --- a/src/extract.c +++ b/src/extract.c @@ -717,7 +717,16 @@ extract_archive (void) print_header (-1); file_name = safer_name_suffix (current_stat_info.file_name, 0); - + if (strip_path_elements) + { + file_name = cut_path_elements (file_name, strip_path_elements); + if (!file_name) + { + skip_member (); + return; + } + } + apply_nonancestor_delayed_set_stat (file_name, 0); /* Take a safety backup of a previously existing file. */ -- 2.45.2