From: Thiago Jung Bauermann Date: Sun, 3 May 2015 16:40:12 +0000 (+0200) Subject: libarchive: auto-detect .Z files as well X-Git-Tag: 1_24_0~135 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b4059f6309c5129a619bd1a95d27919231e07860;p=oweals%2Fbusybox.git libarchive: auto-detect .Z files as well Signed-off-by: Thiago Jung Bauermann Signed-off-by: Denys Vlasenko --- diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c index ab6aa3afc..be536a3d7 100644 --- a/archival/libarchive/open_transformer.c +++ b/archival/libarchive/open_transformer.c @@ -185,6 +185,13 @@ static transformer_state_t *setup_transformer_on_fd(int fd, int fail_if_not_comp USE_FOR_NOMMU(xstate->xformer_prog = "gunzip";) goto found_magic; } + if (ENABLE_FEATURE_SEAMLESS_Z + && magic.b16[0] == COMPRESS_MAGIC + ) { + xstate->xformer = unpack_Z_stream; + USE_FOR_NOMMU(xstate->xformer_prog = "uncompress";) + goto found_magic; + } if (ENABLE_FEATURE_SEAMLESS_BZ2 && magic.b16[0] == BZIP2_MAGIC ) {