[evolution-data-server] Really select INBOX for folder deletion and rename
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Really select INBOX for folder deletion and rename
- Date: Mon, 28 Jun 2010 11:09:12 +0000 (UTC)
commit 6900bf35807c9be0cb2498a63cef4684ff9144d6
Author: David Woodhouse <David Woodhouse intel com>
Date: Thu Jun 24 23:05:48 2010 +0100
Really select INBOX for folder deletion and rename
The folder selection code is a bit screwed -- a string comparison with
ic->select is used to determine which folder a job can run on, but
ic->job->folder is the one that's actually passed to imapx_select().
Fixing that is probably going to involve turning ic->select into a
folder pointer instead of a string -- so these callers might as well
start getting used to the fact that they have to look the INBOX up using
camel_store_get_folder(). I'll come back and actually fix the
imapx_command_start() code later, when there's nothing more important
offending me.
We really do need _not_ to be SELECTed on a renamed or deleted folder, or
entering IDLE will cause some servers (dovecot) to kick us off.
camel/providers/imapx/camel-imapx-server.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 991e5c0..7104bf4 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3933,6 +3933,8 @@ imapx_job_delete_folder_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
encoded_fname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.folder_name);
+ job->folder = camel_store_get_folder(is->store, "INBOX", 0, job->ex);
+
/* make sure to-be-deleted folder is not selected by selecting INBOX for this operation */
ic = camel_imapx_command_new (is, "DELETE", "INBOX", "DELETE %s", encoded_fname);
ic->pri = job->pri;
@@ -3965,6 +3967,8 @@ imapx_job_rename_folder_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
CamelIMAPXCommand *ic;
gchar *en_ofname = NULL, *en_nfname = NULL;
+ job->folder = camel_store_get_folder(is->store, "INBOX", 0, job->ex);
+
en_ofname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.rename_folder.ofolder_name);
en_nfname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.rename_folder.nfolder_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]