summaryrefslogtreecommitdiff
path: root/tar/read.c
diff options
context:
space:
mode:
authorKevin Locke <kevin@kevinlocke.name>2014-01-14 20:05:40 -0700
committerKevin Locke <kevin@kevinlocke.name>2014-01-14 20:05:40 -0700
commitf52077abe8d0ab1719b77d0e771593c76916609b (patch)
tree41cfb4802363fe673e5635aa1af3ecc461d32e66 /tar/read.c
parentda3ec55e71887d6b2e79f75e03e49c80650f7f0a (diff)
downloadlibarchive-f52077abe8d0ab1719b77d0e771593c76916609b.tar.gz
Add --ignore-zeros option to bsdtar
This option is an alias for --options read_concatenated_archive introduced for compatibility with GNU tar. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Diffstat (limited to 'tar/read.c')
-rw-r--r--tar/read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tar/read.c b/tar/read.c
index e2bacad9..fdf34b88 100644
--- a/tar/read.c
+++ b/tar/read.c
@@ -201,6 +201,10 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer)
}
if (ARCHIVE_OK != archive_read_set_options(a, bsdtar->option_options))
lafe_errc(1, 0, "%s", archive_error_string(a));
+ if (bsdtar->option_ignore_zeros)
+ if (archive_read_set_options(a,
+ "read_concatenated_archives") != ARCHIVE_OK)
+ lafe_errc(1, 0, "%s", archive_error_string(a));
if (archive_read_open_filename(a, bsdtar->filename,
bsdtar->bytes_per_block))
lafe_errc(1, 0, "Error opening archive: %s",