aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/providers/local/camel-local-folder.c27
2 files changed, 23 insertions, 12 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index cb8f2adc3e..48429a36f8 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -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-09-03 Not Zed <NotZed@Ximian.com>
* camel-tcp-stream-ssl.c (stream_connect): make ssl connection
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
index f18e6c1015..4f15336785 100644
--- a/camel/providers/local/camel-local-folder.c
+++ b/camel/providers/local/camel-local-folder.c
@@ -311,21 +311,24 @@ camel_local_folder_construct(CamelLocalFolder *lf, CamelStore *parent_store, con
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;
}