X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fconfig.cc;h=503a0c8b585323dd59fad974b55ca47b7399fad6;hb=0a32741fceb7778ced34064eacb7b5aac2c71638;hp=003ce6795c16602b6ed8173e48e14b04c5ae69b1;hpb=79936ac93e486d8ff82729840154bf8c2212ebb6;p=notmuch diff --git a/lib/config.cc b/lib/config.cc index 003ce679..503a0c8b 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -435,11 +435,6 @@ _notmuch_config_load_from_file (notmuch_database_t *notmuch, for (gchar **keys_p = keys; *keys_p; keys_p++) { char *absolute_key = talloc_asprintf (notmuch, "%s.%s", *grp, *keys_p); char *normalized_val; - val = g_key_file_get_string (file, *grp, *keys_p, NULL); - if (! val) { - status = NOTMUCH_STATUS_FILE_ERROR; - goto DONE; - } /* If we opened from a given path, do not overwrite it */ if (strcmp (absolute_key, "database.path") == 0 && @@ -447,6 +442,12 @@ _notmuch_config_load_from_file (notmuch_database_t *notmuch, notmuch->xapian_db) continue; + val = g_key_file_get_string (file, *grp, *keys_p, NULL); + if (! val) { + status = NOTMUCH_STATUS_FILE_ERROR; + goto DONE; + } + normalized_val = _expand_path (notmuch, absolute_key, val); _notmuch_string_map_set (notmuch->config, absolute_key, normalized_val); g_free (val);