summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2020-01-25 11:58:49 -0800
committerMark Adler <madler@alumni.caltech.edu>2020-01-25 11:58:49 -0800
commit9696c84cb1963651707e649978afb07d0c11b254 (patch)
tree3bf22d1abb0acd2f69231023e224b5b944026433
parent501a95544ada9645b6ab5f7e71acb8303743a9ec (diff)
downloadpigz-9696c84cb1963651707e649978afb07d0c11b254.tar.gz
Ignore trailing junk on .gz by default, to emulate gzip.
pigz would always issue a warning and return a non-zero error code if the input gzip stream had non-gzip junk at the end. Now pigz behaves like gzip, which ignores the junk, unless -v (--verbose) is given, in which case there is a warning and a non-zero return code.
-rw-r--r--pigz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pigz.c b/pigz.c
index 98b2dd9..2b99f55 100644
--- a/pigz.c
+++ b/pigz.c
@@ -3570,7 +3570,7 @@ local void infchk(void) {
complain("warning: %s: entries after the first were ignored", g.inf);
// check for non-gzip after gzip stream, or anything after zlib stream
- else if ((g.form == 0 && ret != -1) ||
+ else if ((g.verbosity > 1 && g.form == 0 && ret != -1) ||
(g.form == 1 && (GET(), !g.in_eof)))
complain("warning: %s: trailing junk was ignored", g.inf);
}