From fb6e4bdd980f72082a264894c12ed7e0650a5bf9 Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Thu, 22 Aug 2013 09:44:14 +0200 Subject: Only print marked files when -o is given Fallback to print all files, if no images are marked, was kind of irritating. --- commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands.c') diff --git a/commands.c b/commands.c index c1792a5..501a938 100644 --- a/commands.c +++ b/commands.c @@ -61,9 +61,9 @@ bool it_quit(arg_t a) { unsigned int i; - if (options->to_stdout) { + if (options->to_stdout && markcnt > 0) { for (i = 0; i < filecnt; i++) { - if (!markcnt || files[i].marked) + if (files[i].marked) printf("%s\n", files[i].name); } } -- cgit v1.2.3