summaryrefslogtreecommitdiff
path: root/tar/read.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-10-21 17:05:28 +0900
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-10-22 19:57:20 +0900
commitd06fc9e5e4a47d022188d4b10202873c5d995b6e (patch)
tree759c5fc5ec8e4a5fc1b35e8867ecb160100596d8 /tar/read.c
parent877654feb4ebc4cfd3da33fb0582d1147a21e6d1 (diff)
downloadlibarchive-d06fc9e5e4a47d022188d4b10202873c5d995b6e.tar.gz
Introduce -a/--auto-compress option into bsdtar.
This automatically decides on a creation format and filters by the archive suffix.
Diffstat (limited to 'tar/read.c')
-rw-r--r--tar/read.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tar/read.c b/tar/read.c
index 70607720..ba5c2e33 100644
--- a/tar/read.c
+++ b/tar/read.c
@@ -173,9 +173,7 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer)
archive_error_string(bsdtar->matching));
a = archive_read_new();
- if (bsdtar->compress_program != NULL)
- archive_read_support_filter_program(a, bsdtar->compress_program);
- else
+ if (cset_read_support_filter_program(bsdtar->cset, a) == 0)
archive_read_support_filter_all(a);
archive_read_support_format_all(a);
if (ARCHIVE_OK != archive_read_set_options(a, bsdtar->option_options))