Skip to content

Commit

Permalink
Ignore trailing junk on .gz by default, to emulate gzip.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
madler committed Jan 25, 2020
1 parent 501a955 commit 9696c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pigz.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9696c84

Please sign in to comment.