From: Nathan Moinvaziri Date: Fri, 8 Apr 2022 03:39:21 +0000 (-0700) Subject: Mimic minigzip behavior and only unlink files if not using -c copy out argument. X-Git-Tag: 2.1.0-beta1~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd65646854504e02e68dcf3cffc2f5a5e9439a4e;p=thirdparty%2Fzlib-ng.git Mimic minigzip behavior and only unlink files if not using -c copy out argument. --- diff --git a/test/minideflate.c b/test/minideflate.c index 8ef5ed91..148a2776 100644 --- a/test/minideflate.c +++ b/test/minideflate.c @@ -346,7 +346,7 @@ int main(int argc, char **argv) { if (fin != stdin) { fclose(fin); - if (!keep) { + if (!copyout && !keep) { unlink(argv[i]); } }