On Fri, Sep 15, 2017 at 8:38 AM, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote: > This is a logical followup to "lib: index the content type of > signature parts", which will make it easier to record the message > structure of all messages. > --- > lib/index.cc | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/lib/index.cc b/lib/index.cc > index 0beaae62..ceb444df 100644 > --- a/lib/index.cc > +++ b/lib/index.cc > @@ -409,7 +409,14 @@ _index_mime_part (notmuch_message_t *message, > } > } > if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) { > - /* Don't index encrypted parts. */ > + /* Don't index encrypted parts, but index their content type. */ > + _index_content_type (message, > + g_mime_multipart_get_part (multipart, i)); > + if ((i != GMIME_MULTIPART_ENCRYPTED_VERSION) && > + (i != GMIME_MULTIPART_ENCRYPTED_CONTENT)) { Nitpick, the extra braces aren't needed here. But the patch does what it says on the box. I was first wondering about the usefulness of indexing "application/octet-stream" for the encrypted content parts, but then I think it's good for completeness. BR, Jani. > + _notmuch_database_log (_notmuch_message_database (message), > + "Warning: Unexpected extra parts of multipart/encrypted.\n"); > + } > continue; > } > _index_mime_part (message, > -- > 2.14.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch