[evolution-data-server] Bug 612401 - IMAPX : cann't create folder in top hierarchy



commit 2ef041c9f0d7976af7bd32fa158c90a84910ea67
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Wed Mar 10 16:13:41 2010 +0530

    Bug 612401 - IMAPX : cann't create folder in top hierarchy

 camel/providers/imapx/camel-imapx-store.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 4ff9dc2..d80aea9 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -644,20 +644,21 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 	}
 	
 	parent_real = camel_imapx_store_summary_full_from_path(istore->summary, parent_name);
-	si = camel_store_summary_path ((CamelStoreSummary *)istore->summary, parent_name);
-	if (si == NULL || parent_real == NULL) {
+	if (parent_real == NULL) {
 		camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
 				     _("Unknown parent folder: %s"), parent_name);
 		return NULL;
 	}
 
-	if (si->flags & CAMEL_STORE_INFO_FOLDER_NOINFERIORS) {
+	si = camel_store_summary_path ((CamelStoreSummary *)istore->summary, parent_name);
+	if (si && si->flags & CAMEL_STORE_INFO_FOLDER_NOINFERIORS) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
 				_("The parent folder is not allowed to contain subfolders"));
 		return NULL;
 	}
 
-	camel_store_summary_info_free ((CamelStoreSummary *) istore->summary, si);
+	if (si)
+		camel_store_summary_info_free ((CamelStoreSummary *) istore->summary, si);
 
 	real_name = camel_imapx_store_summary_path_to_full (istore->summary, folder_name, dir_sep);
 	full_name = imapx_concat (istore, parent_real, real_name);



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