]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Allow to use --list-files without other arguments
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 13 Jun 2024 13:34:52 +0000 (14:34 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 13 Jun 2024 13:34:52 +0000 (14:34 +0100)
src/client/rspamc.cxx

index 4afcefacd449aca47357deb035c9dda5392cb386..5a9a654e4de0b267cef0bffa8b7e42f6d3b69067 100644 (file)
@@ -2295,7 +2295,7 @@ int main(int argc, char **argv, char **env)
        add_options(kwattrs);
        auto cmd = maybe_cmd.value();
 
-       if (start_argc == argc) {
+       if (start_argc == argc && files_list == nullptr) {
                /* Do command without input or with stdin */
                if (empty_input) {
                        rspamc_process_input(event_loop, cmd, nullptr, "empty", kwattrs);