aboutsummaryrefslogtreecommitdiff
path: root/src/xz
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-01-16 20:55:10 +0800
committerLasse Collin <lasse.collin@tukaani.org>2023-03-11 21:45:26 +0200
commitccbb991efab1b03783fa00bc7bb2ab14180674f8 (patch)
treed8020f7e9e8483c5b07f8049d91b45f175d5518e /src/xz
parentxz: Use ssize_t for the to-be-ignored return value from write(fd, ptr, 1). (diff)
downloadxz-ccbb991efab1b03783fa00bc7bb2ab14180674f8.tar.xz
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.
Diffstat (limited to 'src/xz')
-rw-r--r--src/xz/args.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xz/args.c b/src/xz/args.c
index b0d63d69..51cee435 100644
--- a/src/xz/args.c
+++ b/src/xz/args.c
@@ -684,7 +684,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.