X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=d5db89b6606c7da011c2a80c5ce460f769f32650;hb=3a747e714c3e99a725619d09d832b9ac683733fe;hp=12743460a4895e1acfc1849f6ac19ac2979ca698;hpb=7ac96b149f5a0e5c03b64856d7c20789dab3c628;p=notmuch 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);