[evolution-data-server/email-factory] Fix path generation which crashes.



commit 0222699c9a959e21dec3400a65d03f0ee65beb12
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Thu Apr 14 02:39:50 2011 +0530

    Fix path generation which crashes.

 mail/daemon/e-mail-data-folder.c  |    2 ++
 mail/daemon/e-mail-data-session.c |    5 +++++
 mail/daemon/e-mail-data-store.c   |    2 ++
 3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/mail/daemon/e-mail-data-folder.c b/mail/daemon/e-mail-data-folder.c
index fe82922..1996d72 100644
--- a/mail/daemon/e-mail-data-folder.c
+++ b/mail/daemon/e-mail-data-folder.c
@@ -1563,6 +1563,8 @@ folder_changed_cb (CamelFolder *folder,
 	g_ptr_array_add (changes->uid_changed, NULL);
 	g_ptr_array_add (changes->uid_recent, NULL);
 
+	ipc(printf("Emitting Folder Changedin %s: %d %d %d %d\n", camel_folder_get_full_name(folder), changes->uid_added->len-1, 
+				changes->uid_removed->len-1, changes->uid_changed->len-1, changes->uid_recent->len -1));
 	egdbus_folder_cf_emit_folder_changed (priv->gdbus_object, 
 					(const gchar *const *) changes->uid_added->pdata, 
 					(const gchar *const *) changes->uid_removed->pdata, 
diff --git a/mail/daemon/e-mail-data-session.c b/mail/daemon/e-mail-data-session.c
index 305eb16..1d57825 100644
--- a/mail/daemon/e-mail-data-session.c
+++ b/mail/daemon/e-mail-data-session.c
@@ -130,6 +130,11 @@ impl_Mail_getStore (EGdbusSessionCS *object, GDBusMethodInvocation *invocation,
 		g_source_remove (priv->exit_timeout);
 		priv->exit_timeout = 0;
 	}
+
+	if (!url || !*url) {
+		ipc(printf("GetStore: empty url passed\n"));
+		return FALSE;
+	}
 	
 	g_mutex_lock (priv->stores_lock);
 	g_mutex_lock (priv->datastores_lock);
diff --git a/mail/daemon/e-mail-data-store.c b/mail/daemon/e-mail-data-store.c
index ba01739..6d7bd1c 100644
--- a/mail/daemon/e-mail-data-store.c
+++ b/mail/daemon/e-mail-data-store.c
@@ -105,6 +105,8 @@ construct_mail_store_path (char *full_name)
 			path[i] = '_';
 		else if (path[i] == ' ')
 			path[i] = '_';
+		else if (path[i] == '[' || path[i] == ']')
+			path[i] = '_';
 	
 	
 



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