From: Ryan Libby Date: Fri, 19 Nov 2021 09:09:35 +0000 (-0800) Subject: tar: respect --ignore-zeros in c r & u modes when reading archives X-Git-Tag: v3.6.0~41^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6b7f59363a95206a2d2236e5498244b99262c53;p=thirdparty%2Flibarchive.git tar: respect --ignore-zeros in c r & u modes when reading archives Previously, --ignore-zeros was only being applied to t and x modes. --- diff --git a/tar/write.c b/tar/write.c index 09c44a3e7..f2fb1c356 100644 --- a/tar/write.c +++ b/tar/write.c @@ -196,6 +196,10 @@ set_reader_options(struct bsdtar *bsdtar, struct archive *a) else archive_clear_error(a); } + if (bsdtar->flags & OPTFLAG_IGNORE_ZEROS) + if (archive_read_set_options(a, + "read_concatenated_archives") != ARCHIVE_OK) + lafe_errc(1, 0, "%s", archive_error_string(a)); } void