[evolution-patches] bug $ffff, maildir folders duplicated




broken abstraction in some nasty code

fcrozat confirmed fix on irc.

--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2251
diff -u -3 -r1.2251 ChangeLog
--- camel/ChangeLog	26 Aug 2004 09:28:45 -0000	1.2251
+++ camel/ChangeLog	15 Sep 2004 13:51:03 -0000
@@ -1,3 +1,11 @@
+2004-09-15  Not Zed  <NotZed Ximian com>
+
+	** See bug #0xffff.
+
+	* providers/local/camel-local-folder.c
+	(camel_local_folder_construct): only emit folder_created if we
+	actually created it.
+
 2004-08-26  Sivaiah Nallagatla <snallagatla novell com>
 	
 	* provoders/groupwise/camel-gw-listner.c 
Index: camel/providers/local/camel-local-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/local/camel-local-folder.c,v
retrieving revision 1.50
diff -u -3 -r1.50 camel-local-folder.c
--- camel/providers/local/camel-local-folder.c	26 May 2004 04:24:01 -0000	1.50
+++ camel/providers/local/camel-local-folder.c	15 Sep 2004 13:51:04 -0000
@@ -310,21 +310,24 @@
 		camel_object_unref (CAMEL_OBJECT (folder));
 		return NULL;
 	}
+
+	/* TODO: This probably shouldn't be here? */
+	if ((flags & CAMEL_STORE_FOLDER_CREATE) != 0) {
+		url = camel_url_copy (((CamelService *) parent_store)->url);
+		camel_url_set_fragment (url, full_name);
 	
-	url = camel_url_copy (((CamelService *) parent_store)->url);
-	camel_url_set_fragment (url, full_name);
+		fi = g_new0 (CamelFolderInfo, 1);
+		fi->full_name = g_strdup (full_name);
+		fi->name = g_strdup (name);
+		fi->uri = camel_url_to_string (url, 0);
+		fi->unread = camel_folder_get_unread_message_count(folder);
+		fi->flags = CAMEL_FOLDER_NOCHILDREN;
 	
-	fi = g_new0 (CamelFolderInfo, 1);
-	fi->full_name = g_strdup (full_name);
-	fi->name = g_strdup (name);
-	fi->uri = camel_url_to_string (url, 0);
-	fi->unread = camel_folder_get_unread_message_count(folder);
-	fi->flags = CAMEL_FOLDER_NOCHILDREN;
+		camel_url_free (url);
 	
-	camel_url_free (url);
-	
-	camel_object_trigger_event(CAMEL_OBJECT (parent_store), "folder_created", fi);
-	camel_folder_info_free(fi);
+		camel_object_trigger_event(CAMEL_OBJECT (parent_store), "folder_created", fi);
+		camel_folder_info_free(fi);
+	}
 	
 	return lf;
 }


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