Only print marked files when -o is given

Fallback to print all files, if no images are marked, was kind of
irritating.
This commit is contained in:
Bert Münnich
2013-08-22 09:44:14 +02:00
parent 7d878bd16d
commit fb6e4bdd98
4 changed files with 8 additions and 8 deletions

View File

@ -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);
}
}