From 7ad2e75ae3af0651a943dae5e6b03c656b47b32b Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 20 Sep 2004 08:10:23 +0000 Subject: ** See bug #0xffff. 2004-09-15 Not Zed ** See bug #0xffff. * providers/local/camel-local-folder.c (camel_local_folder_construct): only emit folder_created if we actually created it. svn path=/trunk/; revision=27304 --- camel/ChangeLog | 8 ++++++++ camel/providers/local/camel-local-folder.c | 27 +++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) (limited to 'camel') 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 + + ** 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 * 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; } -- cgit