aboutsummaryrefslogtreecommitdiff
path: root/lib/message.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-05-25 07:51:17 -0300
committerDavid Bremner <david@tethera.net>2022-06-25 16:06:34 -0300
commit6f749dd24a1c8138a05ac92884e8cb71098c7f6e (patch)
tree1109e3fecdac0c4e0b1029821e33cf14033b76e5 /lib/message.cc
parent3f27cce71f9f154cb0c2134c32d41c31eb62a239 (diff)
lib: check for writable db in n_m_tags_maildir_flags
The database needs to be writable because the list of stored file names will change in general.
Diffstat (limited to 'lib/message.cc')
-rw-r--r--lib/message.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/message.cc b/lib/message.cc
index e2069123..1c87f8c0 100644
--- a/lib/message.cc
+++ b/lib/message.cc
@@ -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);