X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessage.cc;h=d5db89b6606c7da011c2a80c5ce460f769f32650;hp=12743460a4895e1acfc1849f6ac19ac2979ca698;hb=6a9626a2fdddf6115bcf97982fd10053bf48e942;hpb=076f86025d519522cde5787def6c03fc308e8ebc;ds=inline diff --git a/lib/message.cc b/lib/message.cc index 12743460..d5db89b6 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -2002,6 +2002,11 @@ notmuch_message_reindex (notmuch_message_t *message, ret = notmuch_message_remove_all_properties_with_prefix (message, "index."); if (ret) goto DONE; /* XXX TODO: distinguish from other error returns above? */ + if (indexopts && notmuch_indexopts_get_decrypt_policy (indexopts) == NOTMUCH_DECRYPT_FALSE) { + ret = notmuch_message_remove_all_properties (message, "session-key"); + if (ret) + goto DONE; + } /* re-add the filenames with the associated indexopts */ for (; notmuch_filenames_valid (orig_filenames);