Re: [evolution-patches] Re: patch that fixes #42376 (evolution-exchange)
- From: Sushma Rai <rsushma novell com>
- To: Jain Vivek <jvivek novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] Re: patch that fixes #42376 (evolution-exchange)
- Date: Tue, 05 Apr 2005 11:20:28 +0530
Looks fine.
-Sushma.
Jain Vivek wrote:
Hi,
Sending the patch again. Now, I am making use of an existing function to
get the standard folder uri, instead of myself comparing the given
folder uri with all the standard folder uri's.
Thanks,
Vivek Jain
On Fri, 2005-04-01 at 15:26 +0530, Vivek Jain wrote:
Hi,
I noticed a flaw in the earlier approach.
Forgot to decode the uri's (Probably it wouldn't work in case there is a
space in folder name).
Sending the corrected patch.
Thanks,
Vivek Jain
On Fri, 2005-04-01 at 14:01 +0530, Vivek Jain wrote:
Hi,
The attathced patch fixes bug regarding allowing rename/delete of
standard folders in exchange.
http://bugzilla.ximian.com/show_bug.cgi?id=42376
I have made changes in storage/exchange-account.c.
Just checking whether the uri of the folder renamed matches any of the
standard folder's.
Thanks,
Vivek Jain
------------------------------------------------------------------------
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.307
diff -u -p -r1.307 ChangeLog
--- ChangeLog 17 Mar 2005 11:27:25 -0000 1.307
+++ ChangeLog 2 Apr 2005 11:05:38 -0000
@@ -1,3 +1,12 @@
+2005-04-02 Vivek Jain <jvivek novell com>
+
+ **Fixes #42376
+ * storage/exchange-account.c :
+ (exchange_account_remove_folder):
+ (exchange_account_xfer_folder): check whether the folder being
+ renamed/moved/removed is a standard one. threow error as an
+ unsupported operation.
+
2005-03-17 Sushma Rai <rsushma novell com>
* camel/camel-exchange-provider.c (exchange_validate_user_cb): Setting
Index: storage/exchange-account.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-account.c,v
retrieving revision 1.40
diff -u -p -r1.40 exchange-account.c
--- storage/exchange-account.c 31 Mar 2005 08:13:29 -0000 1.40
+++ storage/exchange-account.c 2 Apr 2005 11:05:41 -0000
@@ -474,12 +474,17 @@ exchange_account_remove_folder (Exchange
{
ExchangeHierarchy *hier;
EFolder *folder;
+ const char *name;
g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account),
EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR);
if (!get_folder (account, path, &folder, &hier))
return EXCHANGE_ACCOUNT_FOLDER_DOES_NOT_EXIST;
+
+ name = e_folder_get_name (folder);
+ if (exchange_account_get_standard_uri (account, name))
+ return EXCHANGE_ACCOUNT_FOLDER_UNSUPPORTED_OPERATION;
return exchange_hierarchy_remove_folder (hier, folder);
}
@@ -492,6 +497,7 @@ exchange_account_xfer_folder (ExchangeAc
{
EFolder *source, *dest_parent;
ExchangeHierarchy *source_hier, *dest_hier;
+ const char *name;
g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account),
EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR);
@@ -504,6 +510,12 @@ exchange_account_xfer_folder (ExchangeAc
if (source_hier != dest_hier) {
/* Can't move something between hierarchies */
return EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR;
+ }
+ if (remove_source) {
+ name = e_folder_get_name (source);
+ if (exchange_account_get_standard_uri (account, name))
+ return EXCHANGE_ACCOUNT_FOLDER_UNSUPPORTED_OPERATION;
+
}
return exchange_hierarchy_xfer_folder (source_hier, source,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]