X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=0c2eeab55b6e3eceb08bade87b08e6c9ac333daa;hb=c82554193d0a0c288ad49e3d4fb8c949b92f71fa;hp=dc4b47dcd92784543f18c4640276ee5a1a1557f2;hpb=8aeba1228ace947c1b689ae6ae08db5d53755917;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index dc4b47dc..0c2eeab5 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -459,7 +459,8 @@ _notmuch_message_ensure_metadata (notmuch_message_t *message, void *field) /* all the way without an exception */ break; } catch (const Xapian::DatabaseModifiedError &error) { - notmuch_status_t status = _notmuch_database_reopen (message->notmuch); + notmuch_status_t status = notmuch_database_reopen (message->notmuch, + NOTMUCH_DATABASE_MODE_READ_ONLY); if (status != NOTMUCH_STATUS_SUCCESS) INTERNAL_ERROR ("unhandled error from notmuch_database_reopen: %s\n", notmuch_status_to_string (status)); @@ -1101,7 +1102,7 @@ _notmuch_message_ensure_filename_list (notmuch_message_t *message) *colon = '\0'; - db_path = notmuch_database_get_path (message->notmuch); + db_path = notmuch_config_get (message->notmuch, NOTMUCH_CONFIG_MAIL_ROOT); directory = _notmuch_database_get_directory_path (local, message->notmuch,