summaryrefslogtreecommitdiffhomepage
path: root/archival/bbunzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/bbunzip.c')
-rw-r--r--archival/bbunzip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index b3fb90f31..fce5ab9e1 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -72,7 +72,8 @@ int FAST_FUNC bbunpack(char **argv,
goto err;
} else {
/* "clever zcat" with FILE */
- int fd = open_zipped(filename);
+ /* fail_if_not_compressed because zcat refuses uncompressed input */
+ int fd = open_zipped(filename, /*fail_if_not_compressed:*/ 1);
if (fd < 0)
goto err_name;
xmove_fd(fd, STDIN_FILENO);
@@ -80,7 +81,7 @@ int FAST_FUNC bbunpack(char **argv,
} else
if (option_mask32 & SEAMLESS_MAGIC) {
/* "clever zcat" on stdin */
- if (setup_unzip_on_fd(STDIN_FILENO, /*fail_if_not_detected*/ 0))
+ if (setup_unzip_on_fd(STDIN_FILENO, /*fail_if_not_compressed*/ 1))
goto err;
}