mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Disable file checking when not possible or meaningful.
This commit is contained in:
parent
10b1201f82
commit
c6199980f0
15
main.c
15
main.c
|
|
@ -977,12 +977,9 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if (UNLIMITED && STDIN) {
|
if (UNLIMITED && STDIN) {
|
||||||
print_err("Cannot have -U and stdin, unlimited mode disabled.\n");
|
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
|
/* Work out the compression overhead per compression thread for the
|
||||||
* compression back-ends that need a lot of ram */
|
* compression back-ends that need a lot of ram */
|
||||||
if (LZMA_COMPRESS) {
|
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();
|
show_summary();
|
||||||
|
|
||||||
gettimeofday(&start_time, NULL);
|
gettimeofday(&start_time, NULL);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue