dovecot-2.2: dsync: Mailbox name fixing didn't work when namespa...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 4 23:03:58 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/ef0669c017df
changeset: 16177:ef0669c017df
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 04 23:03:47 2013 +0300
description:
dsync: Mailbox name fixing didn't work when namespace prefixes were used.

diffstat:

 src/doveadm/dsync/dsync-brain-mailbox-tree.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r bb81deef6b42 -r ef0669c017df src/doveadm/dsync/dsync-brain-mailbox-tree.c
--- a/src/doveadm/dsync/dsync-brain-mailbox-tree.c	Thu Apr 04 23:03:30 2013 +0300
+++ b/src/doveadm/dsync/dsync-brain-mailbox-tree.c	Thu Apr 04 23:03:47 2013 +0300
@@ -245,13 +245,14 @@
 			return;
 	}
 	/* 3) probably some reserved name (e.g. dbox-Mails) */
-	str_insert(vname, 0, "_");
+	str_insert(vname, ns->prefix_len, "_");
 	if (dsync_is_valid_name(ns, str_c(vname)))
 		return;
 
 	/* 4) name is too long? just give up and generate a unique name */
 	guid_128_generate(guid);
 	str_truncate(vname, 0);
+	str_append(vname, ns->prefix);
 	str_append(vname, guid_128_to_string(guid));
 	i_assert(dsync_is_valid_name(ns, str_c(vname)));
 }


More information about the dovecot-cvs mailing list