]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message.cc
reindex: drop all properties named with prefix "index."
[notmuch] / lib / message.cc
index 4ab0ed269fd0bca5ce83142aeb97a718a5a1bdc8..e819f27a40da831a0371b03fc8f56b938dabb8e2 100644 (file)
@@ -1999,6 +1999,10 @@ notmuch_message_reindex (notmuch_message_t *message,
        goto DONE;
     }
 
+    ret = notmuch_message_remove_all_properties_with_prefix (message, "index.");
+    if (ret)
+       goto DONE; /* XXX TODO: distinguish from other error returns above? */
+
     /* re-add the filenames with the associated indexopts */
     for (; notmuch_filenames_valid (orig_filenames);
         notmuch_filenames_move_to_next (orig_filenames)) {