]> git.cworth.org Git - notmuch/blobdiff - lib/message.cc
lib: check for writable db in n_m_tags_maildir_flags
[notmuch] / lib / message.cc
index e2069123db4f6547dfc4cde955300088fd15b9c5..1c87f8c0c2eb16ecb6b0f372f22e01072ff4fcae 100644 (file)
@@ -2039,6 +2039,10 @@ notmuch_message_tags_to_maildir_flags (notmuch_message_t *message)
     char *to_set, *to_clear;
     notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
 
+    status = _notmuch_database_ensure_writable (message->notmuch);
+    if (status)
+       return status;
+
     _get_maildir_flag_actions (message, &to_set, &to_clear);
 
     for (filenames = notmuch_message_get_filenames (message);