aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-18 06:23:29 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-18 06:23:29 +0800
commit460c0c33231fddbbfac5ed56c58f3a06332d0040 (patch)
tree71bc3947360237d3d9320e0499189ab57621abea /camel
parente255938fa37f56019a0a36a38c490db3677ae595 (diff)
downloadgsoc2013-evolution-460c0c33231fddbbfac5ed56c58f3a06332d0040.tar
gsoc2013-evolution-460c0c33231fddbbfac5ed56c58f3a06332d0040.tar.gz
gsoc2013-evolution-460c0c33231fddbbfac5ed56c58f3a06332d0040.tar.bz2
gsoc2013-evolution-460c0c33231fddbbfac5ed56c58f3a06332d0040.tar.lz
gsoc2013-evolution-460c0c33231fddbbfac5ed56c58f3a06332d0040.tar.xz
gsoc2013-evolution-460c0c33231fddbbfac5ed56c58f3a06332d0040.tar.zst
gsoc2013-evolution-460c0c33231fddbbfac5ed56c58f3a06332d0040.zip
Same as maildir and mbox append-message.
2001-10-17 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mh-folder.c (mh_append_message): Same as maildir and mbox append-message. * providers/local/camel-maildir-folder.c (maildir_append_message): Same as mbox append. * camel-exception.c (camel_exception_set): Make sure the new description isn't the same as the old description pointer before freeing the old one. (camel_exception_setv): Don't free the old description until we set the new one this way we can reuse the old description in the new description. * providers/local/camel-mbox-folder.c (mbox_append_message): If errno == EINTR, then we got a user-cancel so set the exception appropriately so that we don't make the user shit his pants. svn path=/trunk/; revision=13739
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/local/camel-maildir-folder.c10
-rw-r--r--camel/providers/local/camel-mh-folder.c10
3 files changed, 20 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index f3e5231836..8a13bcc98f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,11 @@
2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/local/camel-mh-folder.c (mh_append_message): Same as
+ maildir and mbox append-message.
+
+ * providers/local/camel-maildir-folder.c (maildir_append_message):
+ Same as mbox append.
+
* camel-exception.c (camel_exception_set): Make sure the new
description isn't the same as the old description pointer before
freeing the old one.
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index bd7f879038..48eb510219 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -177,9 +177,13 @@ maildir_append_message (CamelFolder *folder, CamelMimeMessage *message, const Ca
camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (folder->summary),
camel_message_info_uid (mi));
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to maildir folder: %s: %s"),
- name, g_strerror (errno));
+ if (errno == EINTR)
+ camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
+ _("Maildir append message cancelled"));
+ else
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Cannot append message to maildir folder: %s: %s"),
+ name, g_strerror (errno));
if (output_stream) {
camel_object_unref (CAMEL_OBJECT (output_stream));
diff --git a/camel/providers/local/camel-mh-folder.c b/camel/providers/local/camel-mh-folder.c
index cf9bc827bf..eb3cc8f3bf 100644
--- a/camel/providers/local/camel-mh-folder.c
+++ b/camel/providers/local/camel-mh-folder.c
@@ -168,9 +168,13 @@ mh_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMe
camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (folder->summary),
camel_message_info_uid (mi));
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to mh folder: %s: %s"),
- name, g_strerror (errno));
+ if (errno == EINTR)
+ camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
+ _("MH append message cancelled"));
+ else
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Cannot append message to mh folder: %s: %s"),
+ name, g_strerror (errno));
if (output_stream) {
camel_object_unref (CAMEL_OBJECT (output_stream));