[evolution-data-server] Bug 624018 - Fix error handling in groupwise_get_folder()
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 624018 - Fix error handling in groupwise_get_folder()
- Date: Sat, 10 Jul 2010 12:17:52 +0000 (UTC)
commit f98d7c4fbcff5de233828fb1fd7f2efe4683f13e
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Jul 10 08:16:15 2010 -0400
Bug 624018 - Fix error handling in groupwise_get_folder()
camel/providers/groupwise/camel-groupwise-store.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/groupwise/camel-groupwise-store.c b/camel/providers/groupwise/camel-groupwise-store.c
index 116d53e..563117a 100644
--- a/camel/providers/groupwise/camel-groupwise-store.c
+++ b/camel/providers/groupwise/camel-groupwise-store.c
@@ -572,12 +572,21 @@ groupwise_get_folder (CamelStore *store, const gchar *folder_name, guint32 flags
gint count = 0, cursor, summary_count = 0;
CamelStoreInfo *si = NULL;
guint total = 0;
+ GError *local_error = NULL;
- folder = groupwise_get_folder_from_disk (store, folder_name, flags, error);
+ folder = groupwise_get_folder_from_disk (
+ store, folder_name, flags, &local_error);
if (folder) {
groupwise_store_set_current_folder (gw_store, folder);
return folder;
- }
+
+ /* Ignore "no such folder" errors, fail on any other error. */
+ } else if (!g_error_matches (local_error,
+ CAMEL_STORE_ERROR, CAMEL_STORE_ERROR_NO_FOLDER)) {
+ g_propagate_error (error, local_error);
+ return NULL;
+ } else
+ g_clear_error (&local_error);
camel_service_lock (CAMEL_SERVICE (gw_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]