X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Findex.cc;h=c88ed8d744334ba2f1e7acaf02e9c812ff14ed91;hb=84d3b15d251623cbb66e5eca7ddb8d61aa596d33;hp=1a2e63df58e45a2f163f7ca61ab6a7740032314a;hpb=cc2722ba9e1b2854c5500eb7bb41910478aa8fce;p=notmuch diff --git a/lib/index.cc b/lib/index.cc index 1a2e63df..c88ed8d7 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -318,6 +318,16 @@ _index_mime_part (notmuch_message_t *message, return; } + GMimeContentType *content_type = g_mime_object_get_content_type(part); + if (content_type) { + char *mime_string = g_mime_content_type_to_string(content_type); + if (mime_string) + { + _notmuch_message_gen_terms (message, "mimetype", mime_string); + g_free(mime_string); + } + } + if (GMIME_IS_MULTIPART (part)) { GMimeMultipart *multipart = GMIME_MULTIPART (part); int i;