aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Jain <jvivek@novell.com>2005-08-08 15:05:19 +0800
committerJain Vivek <jvivek@src.gnome.org>2005-08-08 15:05:19 +0800
commitb2f1b4ff38862045dc318413a2d179554a494b99 (patch)
tree63bc6ac66e18107858f2badd1012ab7fa4756adb
parent2a97c03e3b4238a920e79333e6d74a5fec8e1a87 (diff)
downloadgsoc2013-evolution-b2f1b4ff38862045dc318413a2d179554a494b99.tar.gz
gsoc2013-evolution-b2f1b4ff38862045dc318413a2d179554a494b99.tar.zst
gsoc2013-evolution-b2f1b4ff38862045dc318413a2d179554a494b99.zip
check part before using it, else dump source
2005-08-08 Vivek Jain <jvivek@novell.com> * em-format.c: (emf_multipart_appledouble): check part before using it, else dump source svn path=/trunk/; revision=30031
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-format.c16
2 files changed, 17 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4385a2db7a..9d7eddbd8b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-08 Vivek Jain <jvivek@novell.com>
+
+ * em-format.c: (emf_multipart_appledouble):
+ check part before using it, else dump source
+
2005-08-05 Not Zed <NotZed@Ximian.com>
** See bug #312397.
@@ -161,7 +166,7 @@
* em-utils.[ch]: (em_utils_edit_filters) (emu_get_save_filesel)
(em_utils_save_part) (em_utils_save_messages) Added code to handle save selected and
save all options of the attachment bar.
-
+
2005-07-21 Not Zed <NotZed@Ximian.com>
* em-folder-browser.c: reverted dobey's busted view->hide* menu
diff --git a/mail/em-format.c b/mail/em-format.c
index 10965148c0..61bd9551b6 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -1160,6 +1160,7 @@ static void
emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
+ CamelMimePart *mime_part;
int len;
if (!CAMEL_IS_MULTIPART(mp)) {
@@ -1167,11 +1168,16 @@ emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *par
return;
}
- /* try the data fork for something useful, doubtful but who knows */
- len = emf->part_id->len;
- g_string_append_printf(emf->part_id, ".appledouble.1");
- em_format_part(emf, stream, camel_multipart_get_part(mp, 1));
- g_string_truncate(emf->part_id, len);
+ mime_part = camel_multipart_get_part(mp, 1);
+ if (mime_part) {
+ /* try the data fork for something useful, doubtful but who knows */
+ len = emf->part_id->len;
+ g_string_append_printf(emf->part_id, ".appledouble.1");
+ em_format_part(emf, stream, mime_part);
+ g_string_truncate(emf->part_id, len);
+ } else
+ em_format_format_source(emf, stream, part);
+
}
/* RFC ??? */