dovecot: Return INBOX with namespace prefix if we're not in INBO...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 16 03:22:30 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/b6fe8568f207
changeset: 6035:b6fe8568f207
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jul 16 03:22:26 2007 +0300
description:
Return INBOX with namespace prefix if we're not in INBOX namespace.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/lib-storage/list/mailbox-list-maildir-iter.c |    6 ++++--

diffs (23 lines):

diff -r dcaa8d5296a9 -r b6fe8568f207 src/lib-storage/list/mailbox-list-maildir-iter.c
--- a/src/lib-storage/list/mailbox-list-maildir-iter.c	Mon Jul 16 03:15:24 2007 +0300
+++ b/src/lib-storage/list/mailbox-list-maildir-iter.c	Mon Jul 16 03:22:26 2007 +0300
@@ -117,7 +117,7 @@ maildir_fill_readdir(struct maildir_list
 
 		/* make sure the pattern matches */
 		str_truncate(mailbox, 0);
-		if ((ctx->ctx.list->ns->flags & NAMESPACE_FLAG_INBOX) != 0 &&
+		if ((ctx->ctx.list->ns->flags & NAMESPACE_FLAG_INBOX) == 0 ||
 		    strcasecmp(fname + 1, "INBOX") != 0)
 			str_append(mailbox, ctx->ctx.list->ns->prefix);
 		str_append(mailbox, fname + 1);
@@ -197,7 +197,9 @@ maildir_fill_readdir(struct maildir_list
 			iter_is_mailbox(&ctx->ctx, ctx->dir, "",
 					MAILBOX_LIST_FILE_TYPE_UNKNOWN, &flags);
 		if (ret > 0) {
-			node = mailbox_tree_get(ctx->tree_ctx, "INBOX", NULL);
+			mailbox_c = t_strconcat(ctx->ctx.list->ns->prefix,
+						"INBOX", NULL);
+			node = mailbox_tree_get(ctx->tree_ctx, mailbox_c, NULL);
 			node->flags = MAILBOX_NOCHILDREN | MAILBOX_MATCHED;
 		}
 	}


More information about the dovecot-cvs mailing list