aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-08-14 22:14:55 +0800
committerDan Winship <danw@src.gnome.org>2001-08-14 22:14:55 +0800
commit28d41bb47413aa406c4c9f60044da646063a8966 (patch)
treee49a679e5d8f3c7f61283320e5eb55aa60fee0c0 /mail/mail-ops.c
parent79ff3e5c24f9abc1ad5893ea660cf3b0f835c831 (diff)
downloadgsoc2013-evolution-28d41bb47413aa406c4c9f60044da646063a8966.tar.gz
gsoc2013-evolution-28d41bb47413aa406c4c9f60044da646063a8966.tar.zst
gsoc2013-evolution-28d41bb47413aa406c4c9f60044da646063a8966.zip
Fix the fix for #6722.
* folder-browser.c (message_list_drag_data_get): Fix the fix for #6722. * mail-ops.c (save_messages_save): Likewise. (save_part_save): Deal with the possibility that camel_mime_filter_charset_new_convert will return NULL (bad charset name). Fixes #6611. svn path=/trunk/; revision=12008
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index f300a3359f..c21c207f29 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1911,7 +1911,7 @@ save_messages_save (struct _mail_msg *mm)
int fd, i;
char *from;
- fd = open (m->path, O_WRONLY | O_CREAT | O_TRUNC);
+ fd = open (m->path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd == -1) {
camel_exception_setv(&mm->ex, CAMEL_EXCEPTION_SYSTEM,
_("Unable to create output file: %s\n %s"), m->path, strerror(errno));
@@ -2048,8 +2048,10 @@ save_part_save (struct _mail_msg *mm)
&& g_strcasecmp (charset, "utf-8") != 0) {
charsetfilter = camel_mime_filter_charset_new_convert ("utf-8", charset);
filtered_stream = camel_stream_filter_new_with_stream (stream_fs);
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (charsetfilter));
- camel_object_unref (CAMEL_OBJECT (charsetfilter));
+ if (charsetfilter) {
+ camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (charsetfilter));
+ camel_object_unref (CAMEL_OBJECT (charsetfilter));
+ }
} else {
/* no we can't use a CAMEL_BLAH() cast here, since its not true, HOWEVER
we only treat it as a normal stream from here on, so it is OK */