]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: If INBOX isn't subscribed, don't return it in subscriptions list.
authorTimo Sirainen <tss@iki.fi>
Sun, 24 Mar 2013 13:33:36 +0000 (15:33 +0200)
committerTimo Sirainen <tss@iki.fi>
Sun, 24 Mar 2013 13:33:36 +0000 (15:33 +0200)
src/lib-storage/list/mailbox-list-iter.c

index 6d68d6f0a1292a49e65b73619918cd1653b94d37..791ac0325773a64d61d9340d8b6380238e5e3a38 100644 (file)
@@ -732,7 +732,8 @@ mailbox_list_iter_init_namespaces(struct mail_namespace *namespaces,
        ctx->patterns = p_new(pool, const char *, count + 1);
        for (i = 0; i < count; i++)
                ctx->patterns[i] = p_strdup(pool, patterns[i]);
-       if (patterns_match_inbox(namespaces, ctx->patterns)) {
+       if (patterns_match_inbox(namespaces, ctx->patterns) &&
+           (flags & MAILBOX_LIST_ITER_SELECT_SUBSCRIBED) == 0) {
                /* we're going to list the INBOX. get its own flags (i.e. not
                   [no]children) immediately, so if we end up seeing something
                   else called INBOX (e.g. namespace prefix) we can show it