From 7a1dfcef582242643fabd50688e0421ff398d645 Mon Sep 17 00:00:00 2001 From: 1 Date: Wed, 31 Oct 2001 23:55:45 +0000 Subject: Same as below. 2001-10-31 * 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 --- camel/providers/local/camel-maildir-folder.c | 3 ++- camel/providers/local/camel-mbox-folder.c | 3 +-- camel/providers/local/camel-spool-folder.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'camel/providers/local') 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); -- cgit