]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
xz: Fix output of verbose --robot --list modes.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 27 May 2012 18:53:20 +0000 (21:53 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 29 May 2012 09:54:22 +0000 (12:54 +0300)
It printed the filename in "filename (x/y)" format
which it obviously shouldn't do in robot mode.

src/xz/message.c

index 80c86a49c3dbd839ae4077d6cc42b098a80f593d..d9b7d239c6b8fcc7975d8903a20fa47baf5b8565 100644 (file)
@@ -211,7 +211,7 @@ message_set_files(unsigned int files)
 static void
 print_filename(void)
 {
-       if (files_total != 1 || filename != stdin_filename) {
+       if (!opt_robot && (files_total != 1 || filename != stdin_filename)) {
                signals_block();
 
                FILE *file = opt_mode == MODE_LIST ? stdout : stderr;