X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-reply.c;h=6df54fc992bb39b2f61e115b83f53555e05c00a0;hp=fd6a1ec1b11ddb5d9def9ae88f1aa4c59a4ea31a;hb=b645f416059f128ea49991745b648c7ffa045ccc;hpb=6cdd34a4c762c954426f586d514a3e041c1db3b0 diff --git a/notmuch-reply.c b/notmuch-reply.c index fd6a1ec1..6df54fc9 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -80,7 +80,8 @@ format_part_reply (mime_node_t *node) show_text_part_content (node->part, stream_stdout, NOTMUCH_SHOW_TEXT_PART_REPLY); g_object_unref(stream_stdout); } else 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 (node->part)); printf ("Attachment: %s (%s)\n", filename, g_mime_content_type_to_string (content_type)); @@ -655,9 +656,14 @@ notmuch_reply_format_sprinter(void *ctx, notmuch_messages_t *messages; notmuch_message_t *message; mime_node_t *node; + unsigned count; notmuch_status_t status; - if (notmuch_query_count_messages (query) != 1) { + status = notmuch_query_count_messages_st (query, &count); + if (print_status_query ("notmuch reply", query, status)) + return 1; + + if (count != 1) { fprintf (stderr, "Error: search term did not match precisely one message.\n"); return 1; }