--- evolution-data-server-3.10.4/camel/camel-imapx-store-summary.c	2013-12-08 18:43:02.000000000 +0000
+++ evolution-data-server-3.10.4.patched/camel/camel-imapx-store-summary.c	2014-05-05 08:46:27.000000000 +0100
@@ -601,17 +601,25 @@
 {
 	gint len;
 	CamelIMAPXStoreNamespace *ns;
+	CamelIMAPXStoreNamespace *namespaces[] = 
+	{
+	  s->namespaces->personal, 
+	  s->namespaces->other, 
+	  s->namespaces->shared,
+	  NULL
+        };
+        gint i = 0;
+
+	for (i = 0; i < 3; i++) {
+	        ns = namespaces[i];
+	        if (!ns)
+	          continue;
 
-	/* NB: this currently only compares against 1 namespace, in future compare against others */
-	/* CHEN TODO */
-	ns = s->namespaces->personal;
-	while (ns) {
 		len = strlen (ns->prefix);
 		if (len == 0
 		    || (strncmp (ns->prefix, path, len) == 0
 			&& (path[len] == '/' || path[len] == 0)))
 			break;
-		ns = NULL;
 	}
 
 	/* have a default? */
@@ -624,11 +632,19 @@
 {
 	gint len = 0;
 	CamelIMAPXStoreNamespace *ns;
+	CamelIMAPXStoreNamespace *namespaces[] = 
+	{
+	  s->namespaces->personal, 
+	  s->namespaces->other, 
+	  s->namespaces->shared,
+	  NULL
+        };
+        gint i = 0;
 
-	/* NB: this currently only compares against 1 namespace, in future compare against others */
-	/* CHEN TODO */
-	ns = s->namespaces->personal;
-	while (ns) {
+	for (i = 0; i < 3; i++) {
+	        ns = namespaces[i];
+	        if (!ns)
+	          continue;
 		if (ns->prefix)
 			len = strlen (ns->prefix);
 		if (len == 0
