[evolution-exchange] Bug #610426 - Unsubscribing other user's folder throws an error
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-exchange] Bug #610426 - Unsubscribing other user's folder throws an error
- Date: Fri, 19 Feb 2010 16:21:41 +0000 (UTC)
commit bef6790d41f0b6f3eb982a3466620c7383b42644
Author: Milan Crha <mcrha redhat com>
Date: Fri Feb 19 17:20:44 2010 +0100
Bug #610426 - Unsubscribing other user's folder throws an error
camel/camel-exchange-store.c | 3 +++
eplugin/exchange-folder-permission.c | 4 +++-
eplugin/exchange-folder.c | 2 ++
server/storage/exchange-account.c | 4 ++--
server/storage/exchange-account.h | 2 +-
5 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/camel/camel-exchange-store.c b/camel/camel-exchange-store.c
index b32b8ea..e1f0f14 100644
--- a/camel/camel-exchange-store.c
+++ b/camel/camel-exchange-store.c
@@ -418,6 +418,9 @@ exchange_get_folder (CamelStore *store, const gchar *folder_name,
RETURN_VAL_IF_NOT_CONNECTED (exch, ex, NULL);
+ if (!folder_name || !*folder_name || g_ascii_strcasecmp (folder_name, "inbox") == 0)
+ folder_name = "personal/Inbox";
+
folder_dir = exchange_path_to_physical (exch->storage_path, folder_name);
if (!camel_exchange_store_connected (exch, ex)) {
diff --git a/eplugin/exchange-folder-permission.c b/eplugin/exchange-folder-permission.c
index a00f47a..54e28b8 100644
--- a/eplugin/exchange-folder-permission.c
+++ b/eplugin/exchange-folder-permission.c
@@ -82,7 +82,7 @@ call_folder_permissions (const gchar *uri)
{
ExchangeAccount *account = NULL;
EFolder *folder = NULL;
- const gchar *sanitized_path;
+ gchar *sanitized_path;
g_return_if_fail (uri != NULL);
@@ -95,6 +95,8 @@ call_folder_permissions (const gchar *uri)
folder = exchange_account_get_folder (account, sanitized_path);
if (folder)
exchange_permissions_dialog_new (account, folder, NULL);
+
+ g_free (sanitized_path);
}
static gboolean
diff --git a/eplugin/exchange-folder.c b/eplugin/exchange-folder.c
index 19f6d0c..a92303e 100644
--- a/eplugin/exchange-folder.c
+++ b/eplugin/exchange-folder.c
@@ -76,6 +76,8 @@ exchange_get_folder (gchar *uri, CamelFolder *folder, gpointer data)
gchar *target_uri = (gchar *)data;
ExchangeAccount *account = NULL;
+ g_return_if_fail (folder != NULL);
+
account = exchange_operations_get_exchange_account ();
if (!account)
diff --git a/server/storage/exchange-account.c b/server/storage/exchange-account.c
index 5b4139d..3108cf0 100644
--- a/server/storage/exchange-account.c
+++ b/server/storage/exchange-account.c
@@ -1916,7 +1916,7 @@ sanitize_path (const gchar *path)
return g_strdup(""); /* ??? or NULL? */
comps = g_strsplit (path, ";", 2);
- if (comps[1])
+ if (comps[0] && comps[1])
new_path = g_strdup_printf ("%s%s", comps[0], comps[1]);
else if (comps[0])
new_path = g_strdup (comps[0]);
@@ -1925,7 +1925,7 @@ sanitize_path (const gchar *path)
return new_path;
}
-const gchar *
+gchar *
exchange_account_get_sanitized_path (const gchar *uri)
{
gchar *sanitized_path;
diff --git a/server/storage/exchange-account.h b/server/storage/exchange-account.h
index 8deee24..c12fb02 100644
--- a/server/storage/exchange-account.h
+++ b/server/storage/exchange-account.h
@@ -83,7 +83,7 @@ gchar *exchange_account_get_account_uri_param (ExchangeAccount
const gchar *exchange_account_get_standard_uri (ExchangeAccount *acct,
const gchar *item);
-const gchar *exchange_account_get_sanitized_path (const gchar *uri);
+gchar *exchange_account_get_sanitized_path (const gchar *uri);
gchar *exchange_account_get_standard_uri_for (ExchangeAccount *acct,
const gchar *home_uri,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]