From dfee77a151eef9464f596cf22ec6e5226550f1b2 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 28 Feb 2002 03:09:07 +0000 Subject: only save raw streams for leaf parts. svn path=/trunk/; revision=15868 --- camel/camel-mime-part-utils.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'camel') diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index ddd71da90c..e21152951b 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -360,8 +360,15 @@ camel_mime_part_construct_content_from_parser (CamelMimePart *dw, CamelMimeParse #ifdef SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES if (raw) { /* set the raw mime stream on the first part within the multipart/signed */ - camel_stream_reset (raw); - CAMEL_MIME_PART (bodypart)->stream = raw; + CamelDataWrapper *content_object; + + content_object = camel_medium_get_content_object (CAMEL_MEDIUM (bodypart)); + if (!CAMEL_IS_MULTIPART (content_object)) { + camel_stream_reset (raw); + CAMEL_MIME_PART (bodypart)->stream = raw; + } else { + camel_object_unref (CAMEL_OBJECT (raw)); + } camel_mime_parser_filter_remove (mp, saveid); saveid = -1; raw = NULL; -- cgit v1.2.3