Fix regression: show simple text/calendar with plugin
authorRicardo Mones <ricardo@mones.org>
Wed, 17 Aug 2016 07:57:39 +0000 (09:57 +0200)
committerRicardo Mones <ricardo@mones.org>
Wed, 17 Aug 2016 07:57:39 +0000 (09:57 +0200)
Handling the base case where the MIME part being looked up
is directly passed as function parameter was missing.

src/messageview.c

index fc69035605c6295608bcb2270098792f13c30d2e..9d456c46ddcb40dff2969e621d4e280b44ff58cb 100644 (file)
@@ -1300,7 +1300,10 @@ static void messageview_find_part_depth_first(MimeInfoSearch *context, MimeMedia
 
        debug_print("found part %d/%s\n", mimeinfo->type, mimeinfo->subtype);
 
-       if (mimeinfo->type == MIMETYPE_MULTIPART) {
+       if (mimeinfo->type == type
+                       && !strcasecmp(mimeinfo->subtype, subtype)) {
+               context->found = mimeinfo;
+       } else if (mimeinfo->type == MIMETYPE_MULTIPART) {
                if (!strcasecmp(mimeinfo->subtype, "alternative")
                                || !strcasecmp(mimeinfo->subtype, "related")) {
                        context->found = procmime_mimeinfo_next(mimeinfo);