summaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorRyan Libby <rlibby@FreeBSD.org>2021-11-19 01:09:35 -0800
committerRyan Libby <rlibby@FreeBSD.org>2021-11-19 01:09:35 -0800
commitc6b7f59363a95206a2d2236e5498244b99262c53 (patch)
tree873fca971f0b28c363181a52e0f3da80297363b5 /tar
parentede459d2ebb879f5eedb6f7abea203be0b334230 (diff)
downloadlibarchive-c6b7f59363a95206a2d2236e5498244b99262c53.tar.gz
tar: respect --ignore-zeros in c r & u modes when reading archives
Previously, --ignore-zeros was only being applied to t and x modes.
Diffstat (limited to 'tar')
-rw-r--r--tar/write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tar/write.c b/tar/write.c
index 09c44a3e..f2fb1c35 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