dovecot-2.2: lib-storage: Fixed listing subscribed namespace pre...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Mar 24 16:04:49 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/7671f07867b7
changeset: 16094:7671f07867b7
user: Timo Sirainen <tss at iki.fi>
date: Sun Mar 24 16:04:37 2013 +0200
description:
lib-storage: Fixed listing subscribed namespace prefixes.
diffstat:
src/lib-storage/list/mailbox-list-iter.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diffs (46 lines):
diff -r 438561ec237b -r 7671f07867b7 src/lib-storage/list/mailbox-list-iter.c
--- a/src/lib-storage/list/mailbox-list-iter.c Sun Mar 24 15:33:36 2013 +0200
+++ b/src/lib-storage/list/mailbox-list-iter.c Sun Mar 24 16:04:37 2013 +0200
@@ -430,7 +430,6 @@
mailbox_list_ns_prefix_return(struct ns_list_iterate_context *ctx,
struct mail_namespace *ns, bool has_children)
{
- struct mail_namespace *subs_ns;
struct mailbox *box;
enum mailbox_existence existence;
int ret;
@@ -460,13 +459,9 @@
if ((ctx->ctx.flags & (MAILBOX_LIST_ITER_RETURN_SUBSCRIBED |
MAILBOX_LIST_ITER_SELECT_SUBSCRIBED)) != 0) {
- subs_ns = mail_namespace_find_subscribable(ctx->namespaces,
- ns->prefix);
- if (subs_ns != NULL) {
- mailbox_list_set_subscription_flags(subs_ns->list,
- ctx->ns_info.vname,
- &ctx->ns_info.flags);
- }
+ mailbox_list_set_subscription_flags(ns->list,
+ ctx->ns_info.vname,
+ &ctx->ns_info.flags);
}
if (!mailbox_ns_prefix_check_selection_criteria(ctx))
return FALSE;
@@ -608,9 +603,14 @@
ctx->inbox_info.flags |= MAILBOX_CHILDREN;
ctx->inbox_info.flags &= ~MAILBOX_NOINFERIORS;
}
- if (mailbox_is_shared_inbox(info->ns, info->vname)) {
- /* listing shared/$user/INBOX as shared/$user, which
- we already listed as namespace prefix */
+ if (info->ns->prefix_len > 0 &&
+ strncmp(info->vname, info->ns->prefix,
+ info->ns->prefix_len-1) == 0 &&
+ info->vname[info->ns->prefix_len-1] == '\0') {
+ /* this is an entry for namespace prefix, which we
+ already returned. (e.g. shared/$user/INBOX entry
+ returned as shared/$user, or when listing
+ subscribed namespace prefix). */
return FALSE;
}
More information about the dovecot-cvs
mailing list