]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fixed listing INBOX's children with LAYOUT=fs and non-mbox format.
authorTimo Sirainen <tss@iki.fi>
Mon, 5 Aug 2013 14:38:13 +0000 (17:38 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 5 Aug 2013 14:38:13 +0000 (17:38 +0300)
src/lib-storage/list/mailbox-list-fs-iter.c

index 393e8f3891506152910df1ff811690449fc47a7e..acb12eb029243df44d6b31a6ceac76aa5c829bf6 100644 (file)
@@ -671,9 +671,16 @@ fs_list_entry(struct fs_list_iterate_context *ctx,
                                /* no children */
                        } else if ((ctx->ctx.list->flags &
                                    MAILBOX_LIST_FLAG_MAILBOX_FILES) == 0) {
-                               /* skip its children also */
-                               ctx->dir = dir;
-                               pool_unref(&subdir->pool);
+                               if (strcmp(storage_name, "INBOX") == 0) {
+                                       /* INBOX and its children are in
+                                          different paths */
+                                       ctx->inbox_has_children = TRUE;
+                               } else {
+                                       /* naming conflict, skip its
+                                          children also */
+                                       ctx->dir = dir;
+                                       pool_unref(&subdir->pool);
+                               }
                        } else if ((ctx->info.flags & MAILBOX_NOINFERIORS) == 0) {
                                /* INBOX itself is \NoInferiors, but this INBOX
                                   is a directory, and we can make INBOX have