From 29974af08f2eb3ebdff3ae1052a07b6d7361d511 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 14 Oct 2009 16:28:07 -0700 Subject: [PATCH] Index the filename of any attachment. --- notmuch-index-message.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notmuch-index-message.cc b/notmuch-index-message.cc index 6795430b..636757a1 100644 --- a/notmuch-index-message.cc +++ b/notmuch-index-message.cc @@ -439,11 +439,13 @@ gen_terms_part (Xapian::TermGenerator term_gen, return; } - disposition = g_mime_object_get_content_disposition (GMIME_OBJECT (part)); + disposition = g_mime_object_get_content_disposition (part); if (disposition && strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0) { add_term (term_gen.get_document (), "label", "attachment"); + gen_terms (term_gen, "attachment", + g_mime_part_get_filename (GMIME_PART (part))); return; } -- 2.43.0