X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/6cdd34a4c762c954426f586d514a3e041c1db3b0..4900cbee08fbcfd169308cba472929a5eef2bd79:/notmuch-show.c diff --git a/notmuch-show.c b/notmuch-show.c index e0548089..87e52bbc 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -456,7 +456,8 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node, g_mime_part_get_filename (GMIME_PART (node->part)) : NULL; if (disposition && - strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0) + strcasecmp (g_mime_content_disposition_get_disposition (disposition), + GMIME_DISPOSITION_ATTACHMENT) == 0) part_type = "attachment"; else part_type = "part"; @@ -896,8 +897,13 @@ do_show_single (void *ctx, notmuch_messages_t *messages; notmuch_message_t *message; notmuch_status_t status; + unsigned int count; - if (notmuch_query_count_messages (query) != 1) { + status = notmuch_query_count_messages_st (query, &count); + if (print_status_query ("notmuch show", query, status)) + return 1; + + if (count != 1) { fprintf (stderr, "Error: search term did not match precisely one message.\n"); return 1; }