]> git.notmuchmail.org Git - notmuch/blobdiff - lib/open.cc
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / lib / open.cc
index 54d1faf30127c8a72f3c96e838cf9d4edba7e70a..463e38bf0d8f733fe933da033ab993d828255fb7 100644 (file)
@@ -249,6 +249,11 @@ _choose_database_path (notmuch_database_t *notmuch,
        return NOTMUCH_STATUS_NO_DATABASE;
     }
 
+    if (*message) {
+       free (*message);
+       *message = NULL;
+    }
+
     return NOTMUCH_STATUS_SUCCESS;
 }
 
@@ -555,7 +560,7 @@ _finish_open (notmuch_database_t *notmuch,
            goto DONE;
 
        if (key_file)
-           status = _notmuch_config_load_from_file (notmuch, key_file);
+           status = _notmuch_config_load_from_file (notmuch, key_file, &message);
        if (status)
            goto DONE;
 
@@ -961,7 +966,7 @@ notmuch_database_load_config (const char *database_path,
     }
 
     if (key_file) {
-       status = _notmuch_config_load_from_file (notmuch, key_file);
+       status = _notmuch_config_load_from_file (notmuch, key_file, &message);
        if (status)
            goto DONE;
     }