diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-10-17 10:13:38 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-10-17 10:13:38 +0800 |
commit | ed4784f031bae4c963660ea5de1cc8161092f336 (patch) | |
tree | 8951aea679faf59a7be8b80d71991e5b9e0d7650 /composer/e-msg-composer-attachment.c | |
parent | 00eecfd48b1f75da784d0ce93e6be193adb594e8 (diff) | |
download | gsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.tar.gz gsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.tar.zst gsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.zip |
We need to treat message/rfc822 streams differently. Fixes bug #32378.
2002-10-16 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment.c (e_msg_composer_attachment_new): We
need to treat message/rfc822 streams differently. Fixes bug
#32378.
svn path=/trunk/; revision=18382
Diffstat (limited to 'composer/e-msg-composer-attachment.c')
-rw-r--r-- | composer/e-msg-composer-attachment.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c index c0f1ef9b47..fa4f62202a 100644 --- a/composer/e-msg-composer-attachment.c +++ b/composer/e-msg-composer-attachment.c @@ -189,14 +189,24 @@ e_msg_composer_attachment_new (const char *file_name, wrapper = camel_data_wrapper_new (); camel_data_wrapper_construct_from_stream (wrapper, stream); - camel_object_unref (CAMEL_OBJECT (stream)); + mime_type = e_msg_composer_guess_mime_type (file_name); if (mime_type) { + if (!strcasecmp (mime_type, "message/rfc822")) { + camel_object_unref (wrapper); + wrapper = (CamelDataWrapper *) camel_mime_message_new (); + + camel_stream_reset (stream); + camel_data_wrapper_construct_from_stream (wrapper, stream); + } + camel_data_wrapper_set_mime_type (wrapper, mime_type); g_free (mime_type); } else camel_data_wrapper_set_mime_type (wrapper, "application/octet-stream"); + camel_object_unref (CAMEL_OBJECT (stream)); + part = camel_mime_part_new (); camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper); camel_object_unref (CAMEL_OBJECT (wrapper)); |