]> git.notmuchmail.org Git - notmuch/commitdiff
Fix notmuch-reply to not output "Non-text part:" lines for non-leafnode parts.
authorJameson Graef Rollins <jrollins@finestructure.net>
Wed, 8 Jun 2011 19:30:07 +0000 (12:30 -0700)
committerDavid Bremner <bremner@debian.org>
Thu, 6 Oct 2011 13:12:48 +0000 (10:12 -0300)
These lines are just cruft in this case, and can be removed.

notmuch-reply.c

index f4b1a61b7f34410f5e79a8b82af5aceda15cb41c..c500862d36000428284adcec942513911c170e34 100644 (file)
@@ -93,7 +93,12 @@ reply_part_content (GMimeObject *part)
     GMimeContentType *content_type = g_mime_object_get_content_type (GMIME_OBJECT (part));
     GMimeContentDisposition *disposition = g_mime_object_get_content_disposition (part);
 
-    if (g_mime_content_type_is_type (content_type, "text", "*") &&
+    if (g_mime_content_type_is_type (content_type, "multipart", "*") ||
+       g_mime_content_type_is_type (content_type, "message", "rfc822"))
+    {
+       /* Output nothing, since multipart subparts will be handled individually. */
+    }
+    else if (g_mime_content_type_is_type (content_type, "text", "*") &&
        !g_mime_content_type_is_type (content_type, "text", "html"))
     {
        GMimeStream *stream_stdout = NULL, *stream_filter = NULL;
@@ -120,10 +125,6 @@ reply_part_content (GMimeObject *part)
        if (stream_stdout)
            g_object_unref(stream_stdout);
     }
-    else if (g_mime_content_type_is_type (content_type, "message", "rfc822"))
-    {
-       /* Output nothing, since rfc822 subparts will be handled individually. */
-    }
     else
     {
        if (disposition &&