aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
author1 <NotZed@Ximian.com>2001-11-01 07:55:45 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-11-01 07:55:45 +0800
commit7a1dfcef582242643fabd50688e0421ff398d645 (patch)
tree1bbc1b506677140cece96a969f91b27b19c4e703 /camel/providers
parent49bad8cf37fc85a59fb6d2ea199770b33a92f458 (diff)
downloadgsoc2013-evolution-7a1dfcef582242643fabd50688e0421ff398d645.tar
gsoc2013-evolution-7a1dfcef582242643fabd50688e0421ff398d645.tar.gz
gsoc2013-evolution-7a1dfcef582242643fabd50688e0421ff398d645.tar.bz2
gsoc2013-evolution-7a1dfcef582242643fabd50688e0421ff398d645.tar.lz
gsoc2013-evolution-7a1dfcef582242643fabd50688e0421ff398d645.tar.xz
gsoc2013-evolution-7a1dfcef582242643fabd50688e0421ff398d645.tar.zst
gsoc2013-evolution-7a1dfcef582242643fabd50688e0421ff398d645.zip
Same as below.
2001-10-31 <NotZed@Ximian.com> * providers/local/camel-spool-folder.c (spool_get_message): Same as below. * providers/local/camel-maildir-folder.c (maildir_get_message): Same as below. * providers/local/camel-mbox-folder.c (mbox_get_message): Set USER_CANCEL if failed due to EINTR. * camel-filter-driver.c (camel_filter_driver_filter_mbox): If construct from parser fails due to user cancel, set USER_CANCEL on exception. * camel-mime-part.c (construct_from_parser): Return error if the parser had an io error. * camel-mime-message.c (construct_from_parser): Check error on parser/return error. * camel-mime-parser.c (folder_scan_init): Init error number. (camel_mime_parser_errno): New function, return errno of any io failures. (folder_read): Set errno if a failure occured. (folder_seek): Same. (folder_scan_init_with_fd): Setup errno depeding on ok/failure. (folder_scan_init_with_stream): Same. svn path=/trunk/; revision=14559
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/local/camel-maildir-folder.c3
-rw-r--r--camel/providers/local/camel-mbox-folder.c3
-rw-r--r--camel/providers/local/camel-spool-folder.c3
3 files changed, 4 insertions, 5 deletions
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index fc9ab999cb..5336cb39c3 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -226,7 +226,8 @@ static CamelMimeMessage *maildir_get_message(CamelFolder * folder, const gchar *
message = camel_mime_message_new();
if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"),
+ camel_exception_setv(ex, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_FOLDER_INVALID_UID,
+ _("Cannot get message: %s\n %s"),
name, _("Invalid message contents"));
g_free(name);
camel_object_unref((CamelObject *)message_stream);
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c
index eb3faf166b..c2b98c9aa3 100644
--- a/camel/providers/local/camel-mbox-folder.c
+++ b/camel/providers/local/camel-mbox-folder.c
@@ -387,8 +387,7 @@ retry:
message = camel_mime_message_new();
if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) {
- g_warning("Construction failed");
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
+ camel_exception_setv(ex, errno==EINTR?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_FOLDER_INVALID_UID,
_("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path,
_("Message construction failed: Corrupt mailbox?"));
camel_object_unref((CamelObject *)parser);
diff --git a/camel/providers/local/camel-spool-folder.c b/camel/providers/local/camel-spool-folder.c
index 298f04428e..d63e760df4 100644
--- a/camel/providers/local/camel-spool-folder.c
+++ b/camel/providers/local/camel-spool-folder.c
@@ -635,8 +635,7 @@ retry:
message = camel_mime_message_new();
if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) {
- g_warning("Construction failed");
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
+ camel_exception_setv(ex, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_FOLDER_INVALID_UID,
_("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path,
_("Message construction failed: Corrupt mailbox?"));
camel_object_unref((CamelObject *)parser);