From: Luke Rewega Date: Wed, 26 Jul 2023 06:58:57 +0000 (-0400) Subject: tar: respect --strip-components and -s patterns in cru modes on read (#1731) X-Git-Tag: v3.7.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bb5a1a7ddd0d2ecbed36f056782f37e0dd184dd;p=thirdparty%2Flibarchive.git tar: respect --strip-components and -s patterns in cru modes on read (#1731) --- diff --git a/tar/write.c b/tar/write.c index f2fb1c356..d3e4ca4e0 100644 --- a/tar/write.c +++ b/tar/write.c @@ -694,6 +694,8 @@ append_archive(struct bsdtar *bsdtar, struct archive *a, struct archive *ina) while (ARCHIVE_OK == (e = archive_read_next_header(ina, &in_entry))) { if (archive_match_excluded(bsdtar->matching, in_entry)) continue; + if(edit_pathname(bsdtar, in_entry)) + continue; if ((bsdtar->flags & OPTFLAG_INTERACTIVE) && !yes("copy '%s'", archive_entry_pathname(in_entry))) continue;