dovecot-2.1: layout=fs: Don't assume '/' hierarchy separator whe...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 20 15:26:56 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/a41f64348d0d
changeset: 14453:a41f64348d0d
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 20 15:18:14 2012 +0300
description:
layout=fs: Don't assume '/' hierarchy separator when finding mailbox roots.

diffstat:

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

diffs (24 lines):

diff -r 798b5e1609e5 -r a41f64348d0d src/lib-storage/list/mailbox-list-fs-iter.c
--- a/src/lib-storage/list/mailbox-list-fs-iter.c	Fri Apr 20 15:04:58 2012 +0300
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c	Fri Apr 20 15:18:14 2012 +0300
@@ -373,6 +373,7 @@
 {
 	bool full_fs_access =
 		ctx->ctx.list->mail_set->mail_full_filesystem_access;
+	char ns_sep = mail_namespace_get_sep(ctx->ctx.list->ns);
 	const char *const *patterns, *pattern, *const *parentp, *const *childp;
 	const char *p, *last, *root;
 	unsigned int i, parentlen;
@@ -387,10 +388,10 @@
 		for (p = last = pattern; *p != '\0'; p++) {
 			if (*p == '%' || *p == '*')
 				break;
-			if (*p == '/')
+			if (*p == ns_sep)
 				last = p;
 		}
-		if (p == last+1 && *pattern == '/')
+		if (p == last+1 && *pattern == ns_sep)
 			root = "/";
 		else {
 			root = mailbox_list_get_storage_name(ctx->ctx.list,


More information about the dovecot-cvs mailing list