dovecot-2.1: imapc: Index files weren't deleted when mailbox was...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 4 20:26:06 EET 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/a79c256b361e
changeset: 13650:a79c256b361e
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 04 20:36:28 2011 +0200
description:
imapc: Index files weren't deleted when mailbox was deleted.
diffstat:
src/lib-storage/index/imapc/imapc-list.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (32 lines):
diff -r 64ca27392217 -r a79c256b361e src/lib-storage/index/imapc/imapc-list.c
--- a/src/lib-storage/index/imapc/imapc-list.c Fri Nov 04 20:36:06 2011 +0200
+++ b/src/lib-storage/index/imapc/imapc-list.c Fri Nov 04 20:36:28 2011 +0200
@@ -213,7 +213,8 @@
list_set.escape_char = '%';
if (mailbox_list_create(list_set.layout, list->list.ns,
- &list_set, MAILBOX_LIST_FLAG_SECONDARY,
+ &list_set, MAILBOX_LIST_FLAG_SECONDARY |
+ MAILBOX_LIST_FLAG_OPTIONAL_BOXES,
&list->index_list, &error) < 0) {
i_error("imapc: Couldn't create %s mailbox list: %s",
list_set.layout, error);
@@ -505,12 +506,18 @@
imapc_list_delete_mailbox(struct mailbox_list *_list, const char *name)
{
struct imapc_mailbox_list *list = (struct imapc_mailbox_list *)_list;
+ struct mailbox_list *fs_list = imapc_list_get_fs(list);
struct imapc_command *cmd;
struct imapc_simple_context ctx;
cmd = imapc_list_simple_context_init(&ctx, list);
imapc_command_sendf(cmd, "DELETE %s", name);
imapc_simple_run(&ctx);
+
+ if (fs_list != NULL && ctx.ret == 0) {
+ name = imapc_list_get_fs_name(list, name);
+ (void)fs_list->v.delete_mailbox(fs_list, name);
+ }
return ctx.ret;
}
More information about the dovecot-cvs
mailing list