]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
LIST didn't show INBOX if list patterns didn't match namespace prefix.
authorTimo Sirainen <tss@iki.fi>
Sun, 20 Jul 2008 13:03:13 +0000 (16:03 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 20 Jul 2008 13:03:13 +0000 (16:03 +0300)
--HG--
branch : HEAD

src/imap/cmd-list.c

index 877792bd0d329878b8f04ea63cc5812c2698bdd9..ce9928922c1839892a8f78876747480e6c814734 100644 (file)
@@ -619,11 +619,16 @@ static void list_namespace_init(struct cmd_list_context *ctx)
        }
 
        if (array_count(&used_patterns) == 0) {
-               /* it's possible that the namespace prefix matched,
-                  even though its children didn't */
-               if (ctx->cur_ns_send_prefix)
-                       list_namespace_send_prefix(ctx, TRUE);
-               return;
+               if (!ctx->cur_ns_match_inbox) {
+                       /* it's possible that the namespace prefix matched,
+                          even though its children didn't */
+                       if (ctx->cur_ns_send_prefix)
+                               list_namespace_send_prefix(ctx, TRUE);
+                       return;
+               }
+               /* we should still list INBOX */
+               pattern = "INBOX";
+               array_append(&used_patterns, &pattern, 1);
        }
        (void)array_append_space(&used_patterns); /* NULL-terminate */
        pat = array_idx(&used_patterns, 0);