diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-06-24 23:05:48 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-06-28 13:45:19 +0100 |
commit | d28c7d7c4c92ee7619af80f7498645e653d1c7f2 (patch) | |
tree | 3a72a32f0be3fccacd9f04846ce2078a510c8432 | |
parent | f9cef2566ba5e2fc0732256eb726017a8820ca77 (diff) | |
download | evolution-data-server-d28c7d7c4c92ee7619af80f7498645e653d1c7f2.tar.gz |
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.
(cherry picked from commit 6900bf35807c9be0cb2498a63cef4684ff9144d6)
-rw-r--r-- | 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 51738d962..a2527ee57 100644 --- a/camel/providers/imapx/camel-imapx-server.c +++ b/camel/providers/imapx/camel-imapx-server.c @@ -3798,6 +3798,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; @@ -3830,6 +3832,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); |