The "" namespace is nowadays automatically created, so we can't just check
if mail_namespace_find_prefix() returns NULL.
I left the NULL check there for now at least, just in case there's some
reason I couldn't think of when it could be NULL.
static void inbox_set_children_flags(struct ns_list_iterate_context *ctx)
{
+ struct mail_namespace *ns;
const char *prefix;
int ret;
MAILBOX_NOCHILDREN)) != 0)
return;
- if (mail_namespace_find_prefix(ctx->namespaces, "") == NULL) {
+ ns = mail_namespace_find_prefix(ctx->namespaces, "");
+ if (ns == NULL || (ns->flags & NAMESPACE_FLAG_UNUSABLE) != 0) {
/* prefix="" namespace doesn't exist, and neither does
anything beginning with prefix=INBOX/ (we checked this
earlier). there's no way to create children for INBOX. */