diff options
author | Tim Kientzle <kientzle@gmail.com> | 2009-03-26 02:25:35 -0400 |
---|---|---|
committer | Tim Kientzle <kientzle@gmail.com> | 2009-03-26 02:25:35 -0400 |
commit | d100c828dc0773bd5eede181d9cc5a0b4e54d2d0 (patch) | |
tree | 4d33a281b3e75fedd6303701421e770766f490dd /tar/read.c | |
parent | 949feea6d731b66337148beed3738e5a6bdb25f5 (diff) | |
download | libarchive-d100c828dc0773bd5eede181d9cc5a0b4e54d2d0.tar.gz |
Set options before opening the archive.
SVN-Revision: 858
Diffstat (limited to 'tar/read.c')
-rw-r--r-- | tar/read.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -127,17 +127,13 @@ read_archive(struct bsdtar *bsdtar, char mode) else archive_read_support_compression_all(a); archive_read_support_format_all(a); + if (ARCHIVE_OK != archive_read_set_options(a, bsdtar->option_options)) + bsdtar_errc(bsdtar, 1, 0, archive_error_string(a)); if (archive_read_open_file(a, bsdtar->filename, bsdtar->bytes_per_block != 0 ? bsdtar->bytes_per_block : DEFAULT_BYTES_PER_BLOCK)) bsdtar_errc(bsdtar, 1, 0, "Error opening archive: %s", archive_error_string(a)); - if (bsdtar->option_options != NULL) { - r = archive_read_set_options(a, bsdtar->option_options); - if (r != ARCHIVE_OK) - bsdtar_errc(bsdtar, 1, 0, "Error archive options: %s", - archive_error_string(a)); - } do_chdir(bsdtar); |