X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fconfig.cc;h=f61eb63699ce5c0114c18152d54401721efc6c46;hp=8f6ef110788fe174def7c9014ad6be2cba3eff9c;hb=fad2e7540bf9309bfb335650ded753e9ed085eff;hpb=64212c7b91cdb7e65a2a28f994f8d060a50ae78c diff --git a/lib/config.cc b/lib/config.cc index 8f6ef110..f61eb636 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -657,6 +657,7 @@ notmuch_status_t _notmuch_config_load_defaults (notmuch_database_t *notmuch) { notmuch_config_key_t key; + notmuch_status_t status = NOTMUCH_STATUS_SUCCESS; if (notmuch->config == NULL) notmuch->config = _notmuch_string_map_create (notmuch); @@ -669,11 +670,14 @@ _notmuch_config_load_defaults (notmuch_database_t *notmuch) val = _notmuch_string_map_get (notmuch->config, key_string); if (! val) { + if (key == NOTMUCH_CONFIG_MAIL_ROOT && (notmuch->params & NOTMUCH_PARAM_SPLIT)) + status = NOTMUCH_STATUS_NO_MAIL_ROOT; + _notmuch_string_map_set (notmuch->config, key_string, _notmuch_config_default (notmuch, key)); } } - return NOTMUCH_STATUS_SUCCESS; + return status; } const char *