dovecot-2.1: layout=fs: Fixes to mail_shared_explicit_inbox=no

dovecot at dovecot.org dovecot at dovecot.org
Tue May 8 01:25:17 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/8cdc7c13d6f2
changeset: 14515:8cdc7c13d6f2
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 08 01:22:32 2012 +0300
description:
layout=fs: Fixes to mail_shared_explicit_inbox=no

diffstat:

 src/lib-storage/list/mailbox-list-fs-iter.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 41f2bcb43dad -r 8cdc7c13d6f2 src/lib-storage/list/mailbox-list-fs-iter.c
--- a/src/lib-storage/list/mailbox-list-fs-iter.c	Mon May 07 23:39:34 2012 +0300
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c	Tue May 08 01:22:32 2012 +0300
@@ -123,7 +123,8 @@
 		return t_strconcat("/", fname, NULL);
 	} else {
 		/* child */
-		return t_strconcat(dir->storage_name, "/", fname, NULL);
+		return *fname == '\0' ? dir->storage_name :
+			t_strconcat(dir->storage_name, "/", fname, NULL);
 	}
 }
 
@@ -403,6 +404,11 @@
 			   we just want to see its contents (not the
 			   INBOX's children). */
 			root = "";
+		} else if (*prefix_vname == '\0') {
+			/* we need to handle "" explicitly here, because getting
+			   storage name with mail_shared_explicit_inbox=no
+			   would return root=INBOX. */
+			root = "";
 		} else {
 			root = mailbox_list_get_storage_name(ctx->ctx.list,
 							     prefix_vname);


More information about the dovecot-cvs mailing list