[evolution-mapi] Bug #668634 - Warn user with folder create error



commit c50d53087a42641c48cb7bd92d51f184b7649c41
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jan 26 11:29:10 2012 +0100

    Bug #668634 - Warn user with folder create error

 src/camel/camel-mapi-store.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index 40cd702..7566f1c 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -1194,6 +1194,16 @@ mapi_store_create_folder_sync (CamelStore *store,
 		return NULL;
 	}
 
+	if (parent_name && (!*parent_name ||
+	    g_str_equal (parent_name, DISPLAY_NAME_FAVORITES) ||
+	    g_str_equal (parent_name, DISPLAY_NAME_FOREIGN_FOLDERS))) {
+		g_set_error_literal (
+			error, CAMEL_SERVICE_ERROR,
+			CAMEL_SERVICE_ERROR_UNAVAILABLE,
+			_("MAPI folders can be created only within user's mailbox"));
+		return NULL;
+	}
+
 	camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	if (parent_name && *parent_name)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]