diff options
author | Jameson Graef Rollins <jrollins@finestructure.net> | 2011-12-28 12:14:29 -0800 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2011-12-29 17:44:43 -0400 |
commit | ac7f84306474dbecea8f6fee2ef2e8d71cc950f7 (patch) | |
tree | ab08e110f2af395a888f950f52c366dbaa098799 /lib | |
parent | bed6022ed1076803d89260762dd4d90e639f2756 (diff) |
Ignore encrypted parts when indexing.
It appears to be an oversight that encrypted parts were indexed
previously. The terms generated from encrypted parts are meaningless
and do nothing but add bloat to the database. It is not worth
indexing the encrypted content, just as it's not worth indexing the
signatures in signed parts.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/index.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/index.cc b/lib/index.cc index e8e9922b..d8f8b2bf 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -339,6 +339,10 @@ _index_mime_part (notmuch_message_t *message, if (i > 1) fprintf (stderr, "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n"); } + if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) { + /* Don't index encrypted parts. */ + continue; + } _index_mime_part (message, g_mime_multipart_get_part (multipart, i)); } |