evolution-data-server r8640 - in branches/gnome-2-22/camel: . providers/imap



Author: gicmo
Date: Wed Apr 16 20:14:15 2008
New Revision: 8640
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8640&view=rev

Log:
2008-04-16  Christian Kellner  <gicmo gnome org>

	** Fixes bug #514300

	* providers/imap/camel-imap-store.c:
	Make sure we do the Inbox -> INBOX translation at the right place,
	i.e. *after* we asked the camel_store_summary_path with the correct
	folder_name that we got from the server.


Modified:
   branches/gnome-2-22/camel/ChangeLog
   branches/gnome-2-22/camel/providers/imap/camel-imap-store.c

Modified: branches/gnome-2-22/camel/providers/imap/camel-imap-store.c
==============================================================================
--- branches/gnome-2-22/camel/providers/imap/camel-imap-store.c	(original)
+++ branches/gnome-2-22/camel/providers/imap/camel-imap-store.c	Wed Apr 16 20:14:15 2008
@@ -2084,13 +2084,20 @@
 	CamelFolder *new_folder = NULL;
 	CamelStoreInfo *si;
 
-	if (!g_ascii_strcasecmp (folder_name, "INBOX"))
-		folder_name = "INBOX";
-
 	si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
 	if (si) {
 		char *folder_dir, *storage_path;
 
+		/* Note: Although the INBOX is defined to be case-insensitive in the IMAP RFC
+		 * it is still up to the server how to acutally name it in a LIST response. Since
+		 * we stored the name as the server provided it us in the summary we take that name
+		 * to look up the folder. 
+		 * But for the on-disk cache we do always capitalize the Inbox no matter what the
+		 * server provided.
+		 */
+		if (!g_ascii_strcasecmp (folder_name, "INBOX"))
+			folder_name = "INBOX";
+	
 		storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
 		folder_dir = imap_path_to_physical (storage_path, folder_name);
 		g_free(storage_path);



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