aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-10-14 16:28:07 -0700
committerCarl Worth <cworth@cworth.org>2009-10-14 16:28:07 -0700
commit29974af08f2eb3ebdff3ae1052a07b6d7361d511 (patch)
tree5085a01b2d76d21a351315dc19d783e4c84776e6
parent653ff260f5124acfcb5d8f775038fd6cc3daa361 (diff)
Index the filename of any attachment.
-rw-r--r--notmuch-index-message.cc4
1 files changed, 3 insertions, 1 deletions
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;
}