From 2bb5a1a7ddd0d2ecbed36f056782f37e0dd184dd Mon Sep 17 00:00:00 2001 From: Luke Rewega Date: Wed, 26 Jul 2023 02:58:57 -0400 Subject: [PATCH] tar: respect --strip-components and -s patterns in cru modes on read (#1731) --- tar/write.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.2