aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-10-17 10:13:38 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-10-17 10:13:38 +0800
commited4784f031bae4c963660ea5de1cc8161092f336 (patch)
tree8951aea679faf59a7be8b80d71991e5b9e0d7650
parent00eecfd48b1f75da784d0ce93e6be193adb594e8 (diff)
downloadgsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.tar
gsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.tar.gz
gsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.tar.bz2
gsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.tar.lz
gsoc2013-evolution-ed4784f031bae4c963660ea5de1cc8161092f336.tar.xz
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
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer-attachment.c12
2 files changed, 17 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 3683eebc17..5f3c6a9d6a 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2002-10-16 Not Zed <NotZed@Ximian.com>
* e-msg-composer-select-file.c (select_file_internal): Mark the
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));