diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index f12560c..5c8a2e1 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -376,7 +376,7 @@ local_store_create_folder_sync (CamelStore *store,
 		goto exit;
 	}
 
-	if (parent_name)
+	if (parent_name && *parent_name)
 		name = g_strdup_printf("%s/%s/%s", path, parent_name, folder_name);
 	else
 		name = g_strdup_printf("%s/%s", path, folder_name);
@@ -392,7 +392,7 @@ local_store_create_folder_sync (CamelStore *store,
 
 	g_free (name);
 
-	if (parent_name)
+	if (parent_name && *parent_name)
 		name = g_strdup_printf("%s/%s", parent_name, folder_name);
 	else
 		name = g_strdup_printf("%s", folder_name);
