]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
tar: respect --strip-components and -s patterns in cru modes on read (#1731)
authorLuke Rewega <lrewega@c32.ca>
Wed, 26 Jul 2023 06:58:57 +0000 (02:58 -0400)
committerGitHub <noreply@github.com>
Wed, 26 Jul 2023 06:58:57 +0000 (08:58 +0200)
tar/write.c

index f2fb1c356c13efbafc933c62eac651505f55a995..d3e4ca4e0f44deca8a4ab320bc99ffc5a2506b87 100644 (file)
@@ -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;