[Mailer] Fixes for bug #332140

ShiPu <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1141120936.1235.17.camel@autoracing>
hi all,

	this patch is for bug #332140. Anyone who could review it for me?

thanks,

jerry

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
Bug332140.diff (text/x-patch, 5 KB)
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.3000
diff -u -p -r1.3000 ChangeLog
--- calendar/ChangeLog	24 Feb 2006 02:57:09 -0000	1.3000
+++ calendar/ChangeLog	28 Feb 2006 09:26:20 -0000
@@ -1,3 +1,12 @@
+2006-02-28  Shi Pu <[email protected]>
+
+	Fixes #332140
+
+	* gui/dialogs/comp-editor.c: (get_attachment_list):
+	* gui/e-cal-popup.c: (temp_save_part):
+	Changed to transfer filenames from utf-8 to glib encoding before
+	really saving files.
+
 2006-02-23  Chenthill Palanisamy  <[email protected]>
 
 	Fixes #330677
Index: calendar/gui/e-cal-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.c,v
retrieving revision 1.22
diff -u -p -r1.22 e-cal-popup.c
--- calendar/gui/e-cal-popup.c	8 Feb 2006 13:06:02 -0000	1.22
+++ calendar/gui/e-cal-popup.c	28 Feb 2006 09:26:20 -0000
@@ -108,7 +108,7 @@ temp_save_part(CamelMimePart *part, char
 		} else {
 			mfilename = g_strdup(filename);
 			e_filename_make_safe(mfilename);
-			filename = mfilename;
+			filename = g_filename_from_utf8 (mfilename, -1, NULL, NULL, NULL);
 		}
 
 		path = g_build_filename(tmpdir, filename, NULL);
Index: calendar/gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.166
diff -u -p -r1.166 comp-editor.c
--- calendar/gui/dialogs/comp-editor.c	10 Feb 2006 22:27:36 -0000	1.166
+++ calendar/gui/dialogs/comp-editor.c	28 Feb 2006 09:26:21 -0000
@@ -634,7 +634,7 @@ get_attachment_list (CompEditor *editor)
 		CamelDataWrapper *wrapper;
 		CamelStream *stream;
 		char *attach_file_url;
-		char *safe_fname;
+		char *safe_fname, *utf8_safe_fname;
 		char *filename;
 	
 		wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (p->data));
@@ -643,12 +643,14 @@ get_attachment_list (CompEditor *editor)
 		 * as a mime part file into the directory denoting the
 		 * calendar source */
 		safe_fname = camel_file_util_safe_filename(camel_mime_part_get_filename ((CamelMimePart *)p->data));
+		utf8_safe_fname = g_filename_from_utf8 (safe_fname, -1, NULL, NULL, NULL);
 
-		filename = g_strdup_printf ("%s-%s", comp_uid, safe_fname);
+		filename = g_strdup_printf ("%s-%s", comp_uid, utf8_safe_fname);
 
 		attach_file_url = g_build_path ("/", local_store, filename, NULL);
 
 		g_free (filename);
+		g_free (utf8_safe_fname);
 		g_free (safe_fname);
 
 		/* do not overwrite existing files, this will result in truncation */
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3810
diff -u -p -r1.3810 ChangeLog
--- mail/ChangeLog	27 Feb 2006 17:54:47 -0000	1.3810
+++ mail/ChangeLog	28 Feb 2006 09:26:22 -0000
@@ -1,3 +1,33 @@
+2006-02-28  Shi Pu <[email protected]>
+
+	** Fixes Bug #332140
+
+	* em-utils.c: (em_utils_temp_save_part):
+	Changed to transfer filenames from utf-8 to glib encoding before
+	really saving files.
+
 2006-02-27  Jeffrey Stedfast  <[email protected]>
 
 	* em-format-html-display.c (efhd_xpkcs7mime_validity_clicked):
Index: mail/em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.77
diff -u -p -r1.77 em-utils.c
--- mail/em-utils.c	20 Feb 2006 16:01:00 -0000	1.77
+++ mail/em-utils.c	28 Feb 2006 09:26:22 -0000
@@ -1275,7 +1275,7 @@ em_utils_temp_save_part(GtkWidget *paren
 	} else {
 		mfilename = g_strdup(filename);
 		e_filename_make_safe(mfilename);
-		filename = mfilename;
+		filename = g_filename_from_utf8 (mfilename, -1, NULL, NULL, NULL);
 	}
 
 	path = g_build_filename(tmpdir, filename, NULL);
Index: widgets/misc/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
retrieving revision 1.400
diff -u -p -r1.400 ChangeLog
--- widgets/misc/ChangeLog	24 Feb 2006 05:41:33 -0000	1.400
+++ widgets/misc/ChangeLog	28 Feb 2006 09:26:24 -0000
@@ -1,3 +1,11 @@
+2006-02-28  Shi Pu <[email protected]>
+
+	** Fixes #332140
+
+	* e-attachment-bar.c: (temp_save_part):
+	Changed to transfer filenames from utf-8 to glib encoding before
+	really saving files.
+
 2006-02-24  Srinivasa Ragavan  <[email protected]>
 
 	** Fixes bug #322789
Index: widgets/misc/e-attachment-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-attachment-bar.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-attachment-bar.c
--- widgets/misc/e-attachment-bar.c	30 Jan 2006 12:28:04 -0000	1.15
+++ widgets/misc/e-attachment-bar.c	28 Feb 2006 09:26:24 -0000
@@ -687,7 +687,7 @@ temp_save_part(CamelMimePart *part)
 	} else {
 		mfilename = g_strdup(filename);
 		e_filename_make_safe(mfilename);
-		filename = mfilename;
+		filename = g_filename_from_utf8 (mfilename, -1, NULL, NULL, NULL);
 	}
 
 	path = g_build_filename(tmpdir, filename, NULL);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.