# HG changeset patch # User Timo Sirainen # Date 1188224389 -10800 # Node ID 5313cbcfccc6a9d83eb5681fd8dac5bcb9c80a22 # Parent 3cee177eced6c9e02c278a4687e06c8ea67e2d92 Don't crash if mailbox named INBOX is listed in prefixless namespace, but which doesn't have inbox=yes. Instead the mailbox is simply not listed. diff -r 3cee177eced6 -r 5313cbcfccc6 src/imap/cmd-list.c --- a/src/imap/cmd-list.c Fri Aug 24 21:43:27 2007 +0300 +++ b/src/imap/cmd-list.c Mon Aug 27 17:19:49 2007 +0300 @@ -315,12 +315,18 @@ flags = info->flags; if (strcasecmp(name, "INBOX") == 0) { - i_assert((ctx->ns->flags & NAMESPACE_FLAG_INBOX) != 0); if (ctx->inbox_found) { /* we already listed this at the beginning of handling INBOX/ namespace */ continue; } + if ((ctx->ns->flags & NAMESPACE_FLAG_INBOX) == 0) { + /* INBOX is in non-empty prefix namespace, + and we're now listing prefixless namespace + that contains INBOX. There's no way we can + show this mailbox. */ + continue; + } ctx->inbox_found = TRUE; } if (ctx->cur_ns_send_prefix)