Skip to content

Commit

Permalink
LAYOUT=Maildir++: List INBOX as \NoInferiors when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Dec 14, 2017
1 parent 9a2149c commit 38e6026
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib-storage/list/mailbox-list-maildir-iter.c
Expand Up @@ -505,6 +505,12 @@ maildir_list_iter_next(struct mailbox_list_iterate_context *_ctx)
return mailbox_list_iter_default_next(_ctx);

ctx->info.flags = node->flags;
if (strcmp(ctx->info.vname, "INBOX") == 0 &&
mail_namespace_is_inbox_noinferiors(ctx->info.ns)) {
i_assert((ctx->info.flags & MAILBOX_NOCHILDREN) != 0);
ctx->info.flags &= ~MAILBOX_NOCHILDREN;
ctx->info.flags |= MAILBOX_NOINFERIORS;
}
if ((_ctx->flags & MAILBOX_LIST_ITER_RETURN_SUBSCRIBED) != 0 &&
(_ctx->flags & MAILBOX_LIST_ITER_SELECT_SUBSCRIBED) == 0) {
/* we're listing all mailboxes but we want to know
Expand Down

0 comments on commit 38e6026

Please sign in to comment.