dovecot: If we're only listing subscriptions without flags, igno...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jul 18 02:26:13 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/437dce5162c5
changeset: 6055:437dce5162c5
user: Timo Sirainen <tss at iki.fi>
date: Wed Jul 18 01:57:45 2007 +0300
description:
If we're only listing subscriptions without flags, ignore mailbox indexes.
diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
src/lib-storage/list/index-mailbox-list.c | 7 ++++++-
diffs (23 lines):
diff -r d0787ca97a0c -r 437dce5162c5 src/lib-storage/list/index-mailbox-list.c
--- a/src/lib-storage/list/index-mailbox-list.c Wed Jul 18 01:45:34 2007 +0300
+++ b/src/lib-storage/list/index-mailbox-list.c Wed Jul 18 01:57:45 2007 +0300
@@ -117,13 +117,18 @@ index_mailbox_list_iter_init(struct mail
struct index_mailbox_list_iterate_context *ctx;
enum mailbox_list_sync_flags sync_flags;
const char *prefix, *cur_prefix, *const *tmp, *tmp_patterns[2];
+ enum mailbox_list_iter_flags subs_flags;
int cur_recurse_level;
ctx = i_new(struct index_mailbox_list_iterate_context, 1);
ctx->ctx.list = list;
ctx->ctx.flags = flags;
- if ((flags & MAILBOX_LIST_ITER_RAW_LIST) != 0) {
+ subs_flags = MAILBOX_LIST_ITER_SELECT_SUBSCRIBED |
+ MAILBOX_LIST_ITER_RETURN_NO_FLAGS;
+ if ((flags & MAILBOX_LIST_ITER_RAW_LIST) != 0 ||
+ (flags & (subs_flags |
+ MAILBOX_LIST_ITER_RETURN_CHILDREN)) == subs_flags) {
/* Ignore indexes completely */
ctx->backend_ctx = ilist->module_ctx.super.
iter_init(list, patterns, flags);
More information about the dovecot-cvs
mailing list