evolution-data-server r10207 - trunk/camel/providers/groupwise



Author: pchen
Date: Mon Apr 13 08:44:56 2009
New Revision: 10207
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=10207&view=rev

Log:
Fixes #471083 (bnc). Do not allow deletion of system folders.

Modified:
   trunk/camel/providers/groupwise/ChangeLog
   trunk/camel/providers/groupwise/camel-groupwise-store.c

Modified: trunk/camel/providers/groupwise/camel-groupwise-store.c
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-store.c	(original)
+++ trunk/camel/providers/groupwise/camel-groupwise-store.c	Mon Apr 13 08:44:56 2009
@@ -485,7 +485,11 @@
 		fi->flags |= CAMEL_FOLDER_TYPE_TRASH;
 	else if (!strcmp (folder_name, "Junk Mail"))
 		fi->flags |= CAMEL_FOLDER_TYPE_JUNK;
-		
+
+	if (groupwise_is_system_folder (folder_name))
+		fi->flags |= CAMEL_FOLDER_SYSTEM;
+	
+
 	fi->name = g_strdup(name);
 	return fi;
 }
@@ -1303,6 +1307,12 @@
 
 	CAMEL_SERVICE_REC_LOCK (store, connect_lock);
 
+	if (groupwise_is_system_folder (folder_name)) {
+		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot delete GroupWise system folder '%s'"),
+				      folder_name);
+		return;
+	}
+
 	if (!camel_groupwise_store_connected (groupwise_store, ex)) {
 		CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
 		return;



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