diff --git a/main.c b/main.c index 2ffd6f9..accdd9e 100644 --- a/main.c +++ b/main.c @@ -977,12 +977,9 @@ int main(int argc, char *argv[]) if (UNLIMITED && STDIN) { print_err("Cannot have -U and stdin, unlimited mode disabled.\n"); - control.flags &= ~ FLAG_UNLIMITED; + control.flags &= ~FLAG_UNLIMITED; } - if (CHECK_FILE && (!DECOMPRESS || !TEST_ONLY)) - print_err("Can only check file written on decompression or testing.\n"); - /* Work out the compression overhead per compression thread for the * compression back-ends that need a lot of ram */ if (LZMA_COMPRESS) { @@ -1049,6 +1046,16 @@ int main(int argc, char *argv[]) } } + if (CHECK_FILE) { + if (!DECOMPRESS) { + print_err("Can only check file written on decompression.\n"); + control.flags &= ~FLAG_CHECK; + } else if (STDOUT) { + print_err("Can't check file written when writing to stdout. Checking disabled.\n"); + control.flags &= ~FLAG_CHECK; + } + } + show_summary(); gettimeofday(&start_time, NULL);