From 88dc19163421282369c0989e997c05f9a447edc6 Mon Sep 17 00:00:00 2001 From: Jia Tan Date: Mon, 16 Jan 2023 20:55:10 +0800 Subject: [PATCH] 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. --- src/xz/args.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xz/args.c b/src/xz/args.c index b0a1174a..c31f759a 100644 --- a/src/xz/args.c +++ b/src/xz/args.c @@ -720,7 +720,8 @@ args_parse(args_info *args, int argc, char **argv) // be done also when uncompressing raw data, since for raw decoding // the options given on the command line are used to know what kind // 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(); // If no filenames are given, use stdin.