From 4608ce31aea6c4ed83dfe4337d72ed2659ec85a6 Mon Sep 17 00:00:00 2001 From: Simon Zheng Date: Mon, 6 Mar 2006 10:11:50 +0000 Subject: Fixes #311482 As uri is encaped ASCII-encoded, it can't be recognized when 2006-03-06 Simon Zheng Fixes #311482 * gui/dialogs/comp-editor.c: (set_attachment_list): As uri is encaped ASCII-encoded, it can't be recognized when setting mime part. Use filename instead of uri. svn path=/trunk/; revision=31657 --- calendar/gui/dialogs/comp-editor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 033d93ca7b..cc19b006f8 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2297,7 +2297,6 @@ set_attachment_list (CompEditor *editor, GSList *attach_list) camel_data_wrapper_construct_from_stream (wrapper, stream); camel_data_wrapper_set_mime_type (wrapper, "application/octet-stream"); } - g_free (file_name); camel_object_unref (stream); @@ -2307,12 +2306,13 @@ set_attachment_list (CompEditor *editor, GSList *attach_list) camel_mime_part_set_disposition (part, "attachment"); - char *ptr = strstr (attach_filename, comp_uid); + char *ptr = strstr (file_name, comp_uid); if (ptr) { ptr += strlen(comp_uid); if (*ptr++ == '-') camel_mime_part_set_filename (part, ptr); } + g_free (file_name); e_attachment_bar_attach_mime_part ((EAttachmentBar *) editor->priv->attachment_bar, part); e_expander_set_expanded (E_EXPANDER (editor->priv->attachment_expander), TRUE); -- cgit v1.2.3