X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.c;fp=notmuch.c;h=616639083e92c2d6e7644c38f238bf4022bf7512;hp=bcb4b768d3b161b8b3f825190a2d531277116efe;hb=77d4b26d3e374afac0012148a8ac0a08158406f1;hpb=f5d4349921ded021756d6754d347420e68b23111 diff --git a/notmuch.c b/notmuch.c index bcb4b768..61663908 100644 --- a/notmuch.c +++ b/notmuch.c @@ -454,7 +454,7 @@ main (int argc, char *argv[]) int ret = EXIT_SUCCESS; notmuch_opt_desc_t options[] = { - { .opt_string = &config_file_name, .name = "config" }, + { .opt_string = &config_file_name, .name = "config", .allow_empty = TRUE }, { .opt_inherit = notmuch_shared_options }, { } }; @@ -581,6 +581,9 @@ main (int argc, char *argv[]) } if (command->mode & NOTMUCH_COMMAND_CONFIG_OPEN) { + if (! config_file_name) + config_file_name = notmuch_config_path (notmuch); + config = notmuch_config_open (notmuch, config_file_name, command->mode); if (! config) { ret = EXIT_FAILURE;