X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessage.cc;h=68f7e68d8810e61b2fb397d62390615afdee9729;hp=ed8c59e9b072795aec252b99def49a5d4b14e20e;hb=ec573cd54fb3ea98f37a3c3612b00fb16e34578b;hpb=5dbfed4a73d8c310afa51108af1ca6484506145a diff --git a/lib/message.cc b/lib/message.cc index ed8c59e9..68f7e68d 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -655,6 +655,10 @@ _notmuch_message_add_filename (notmuch_message_t *message, if (filename == NULL) INTERNAL_ERROR ("Message filename cannot be NULL."); + if (! (message->notmuch->features & NOTMUCH_FEATURE_FILE_TERMS) || + ! (message->notmuch->features & NOTMUCH_FEATURE_BOOL_FOLDER)) + return NOTMUCH_STATUS_UPGRADE_REQUIRED; + relative = _notmuch_database_relative_path (message->notmuch, filename); status = _notmuch_database_split_path (local, relative, &directory, NULL); @@ -699,6 +703,10 @@ _notmuch_message_remove_filename (notmuch_message_t *message, notmuch_private_status_t private_status; notmuch_status_t status; + if (! (message->notmuch->features & NOTMUCH_FEATURE_FILE_TERMS) || + ! (message->notmuch->features & NOTMUCH_FEATURE_BOOL_FOLDER)) + return NOTMUCH_STATUS_UPGRADE_REQUIRED; + status = _notmuch_database_filename_to_direntry ( local, message->notmuch, filename, NOTMUCH_FIND_LOOKUP, &direntry); if (status || !direntry)