Do not open collection window for --list option and no files
authorColin Clark <colin.clark@cclark.uk>
Tue, 20 Apr 2021 10:14:33 +0000 (11:14 +0100)
committerColin Clark <colin.clark@cclark.uk>
Tue, 20 Apr 2021 10:14:33 +0000 (11:14 +0100)
If the command line option --list is given, but there are no files
listed on the command line, do not open a blank collection window

src/main.c

index fbf8f2d..f93f54d 100644 (file)
@@ -1131,7 +1131,7 @@ gint main(gint argc, gchar *argv[])
        /* Files from multiple folders, or --list option given
         * then open an unnamed collection and insert all files
         */
-       if ((command_line->cmd_list && !single_dir) || (command_line->startup_command_line_collection))
+       if ((command_line->cmd_list && !single_dir) || (command_line->startup_command_line_collection && command_line->cmd_list))
                {
                GList *work;
                CollectWindow *cw;