aboutsummaryrefslogtreecommitdiff
path: root/lib/index.cc
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2015-09-26 12:35:21 +0300
committerDavid Bremner <david@tethera.net>2015-11-19 07:47:29 -0400
commit506b81679a883d2a96bcd17e7c826a3166bdf82e (patch)
treeb3609455f8ff1c4da5f65693bfc613f685fcffb4 /lib/index.cc
parentc1c955786ae1a828f09fd49d7b996dce624ee682 (diff)
lib: content disposition values are not case-sensitive
Per RFC 2183, the values for Content-Disposition values are not case-sensitive. While at it, use the gmime function for getting at the disposition string instead of referencing the field directly. This fixes "attachment" tagging and filename term generation for attachments while indexing.
Diffstat (limited to 'lib/index.cc')
-rw-r--r--lib/index.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/index.cc b/lib/index.cc
index e81aa819..f166aefd 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -377,7 +377,8 @@ _index_mime_part (notmuch_message_t *message,
disposition = g_mime_object_get_content_disposition (part);
if (disposition &&
- strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0)
+ strcasecmp (g_mime_content_disposition_get_disposition (disposition),
+ GMIME_DISPOSITION_ATTACHMENT) == 0)
{
const char *filename = g_mime_part_get_filename (GMIME_PART (part));