X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=12743460a4895e1acfc1849f6ac19ac2979ca698;hb=836ec85b0cb7deaef11028d68d3e6a9be7a1e200;hp=4ab0ed269fd0bca5ce83142aeb97a718a5a1bdc8;hpb=008a5e92eb157e2bb8622cb2fbf644deba5ba4b4;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index 4ab0ed26..12743460 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1961,7 +1961,7 @@ _notmuch_message_frozen (notmuch_message_t *message) notmuch_status_t notmuch_message_reindex (notmuch_message_t *message, - notmuch_indexopts_t unused (*indexopts)) + notmuch_indexopts_t *indexopts) { notmuch_database_t *notmuch = NULL; notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS; @@ -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)) { @@ -2038,7 +2042,7 @@ notmuch_message_reindex (notmuch_message_t *message, if (found == 0) _notmuch_message_set_header_values (message, date, from, subject); - ret = _notmuch_message_index_file (message, message_file); + ret = _notmuch_message_index_file (message, indexopts, message_file); if (ret == NOTMUCH_STATUS_FILE_ERROR) continue;