1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

xz: Do not set compression settings with raw format in list mode.

Calling coder_set_compression_settings() in list mode with verbose mode
on caused the filter chain and memory requirements to print. This was
unnecessary since the command results in an error and not consistent
with other formats like lzma and alone.
This commit is contained in:
Jia Tan 2023-01-16 20:55:10 +08:00
parent 571919c47b
commit 123255b6ed

View file

@ -720,7 +720,8 @@ args_parse(args_info *args, int argc, char **argv)
// be done also when uncompressing raw data, since for raw decoding // be done also when uncompressing raw data, since for raw decoding
// the options given on the command line are used to know what kind // the options given on the command line are used to know what kind
// of raw data we are supposed to decode. // of raw data we are supposed to decode.
if (opt_mode == MODE_COMPRESS || opt_format == FORMAT_RAW) if (opt_mode == MODE_COMPRESS || (opt_format == FORMAT_RAW
&& opt_mode != MODE_LIST))
coder_set_compression_settings(); coder_set_compression_settings();
// If no filenames are given, use stdin. // If no filenames are given, use stdin.