X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage-file.c;h=647ccf3abedaaf52f95bcc44e9a3199de8d4b42d;hb=6e7365fb2033d59d4040d20c1d05c0e652dfcc7b;hp=15b0bfad2e63772c314f4545eb0a3ffa19a15b2c;hpb=8aeba1228ace947c1b689ae6ae08db5d53755917;p=notmuch diff --git a/lib/message-file.c b/lib/message-file.c index 15b0bfad..647ccf3a 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -64,7 +64,7 @@ _notmuch_message_file_open_ctx (notmuch_database_t *notmuch, if (unlikely (message == NULL)) return NULL; - const char *prefix = notmuch_database_get_path (notmuch); + const char *prefix = notmuch_config_get (notmuch, NOTMUCH_CONFIG_MAIL_ROOT); if (prefix == NULL) goto FAIL; @@ -141,7 +141,6 @@ _notmuch_message_file_parse (notmuch_message_file_t *message) { GMimeParser *parser; notmuch_status_t status = NOTMUCH_STATUS_SUCCESS; - static int initialized = 0; bool is_mbox; if (message->message) @@ -149,10 +148,7 @@ _notmuch_message_file_parse (notmuch_message_file_t *message) is_mbox = _is_mbox (message->stream); - if (! initialized) { - g_mime_init (); - initialized = 1; - } + _notmuch_init (); message->headers = g_hash_table_new_full (strcase_hash, strcase_equal, free, g_free);