From 0ddaedf4d698305250f84f29f2e20631b4b5cc61 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 21 Sep 2001 19:52:58 +0000 Subject: Go back to not using camel_folder_info_build() here because this seems to 2001-09-21 Jeffrey Stedfast * providers/imap/camel-imap-store.c (create_folder): Go back to not using camel_folder_info_build() here because this seems to break folder creation (returning nodes from the root path when it shouldn't be?). svn path=/trunk/; revision=13054 --- camel/providers/imap/camel-imap-store.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'camel/providers/imap/camel-imap-store.c') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index a632c6f0d6..6f058a7c60 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -1118,6 +1118,8 @@ create_folder (CamelStore *store, const char *parent_name, g_free (full_name); if (response) { + CamelFolderInfo *parent, *fi; + camel_imap_response_free (imap_store, response); /* We have to do this in case we are creating a @@ -1136,7 +1138,9 @@ create_folder (CamelStore *store, const char *parent_name, goto exception; } - for (i = 1; pathnames[i]; i++) { + root = parent = folders->pdata[i]; + + for (i = 1; parent && pathnames[i]; i++) { full_name = imap_concat (imap_store, parent_name, pathnames[i]); g_free (pathnames[i]); @@ -1149,13 +1153,16 @@ create_folder (CamelStore *store, const char *parent_name, if (folders->len != i + 1) break; + + fi = folders->pdata[i]; + camel_folder_info_build_path (fi, imap_store->dir_sep); + parent->child = fi; + fi->parent = parent; + parent = fi; } g_free (pathnames); - root = camel_folder_info_build (folders, camel_url_get_param (CAMEL_SERVICE (store)->url, "namespace"), - imap_store->dir_sep, TRUE); - g_ptr_array_free (folders, TRUE); } -- cgit v1.2.3