aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/local
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/local')
-rw-r--r--camel/providers/local/camel-local-folder.c27
1 files changed, 15 insertions, 12 deletions
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;
}