dovecot-2.0: dsync: Avoid errors about duplicate GUID when INBOX...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 4 20:27:20 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.0/rev/4c27b2418882
changeset: 13106:4c27b2418882
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 04 20:27:10 2012 +0300
description:
dsync: Avoid errors about duplicate GUID when INBOX/INBOX exists.

diffstat:

 src/dsync/dsync-worker-local.c |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 13b8b90bed3e -r 4c27b2418882 src/dsync/dsync-worker-local.c
--- a/src/dsync/dsync-worker-local.c	Tue Jul 17 16:20:20 2012 +0300
+++ b/src/dsync/dsync-worker-local.c	Tue Sep 04 20:27:10 2012 +0300
@@ -535,6 +535,13 @@
 	dsync_box_r->name_sep = info->ns->sep;
 
 	storage_name = mail_namespace_get_storage_name(info->ns, info->name);
+	if (strcmp(storage_name, "INBOX") == 0 &&
+	    strcmp(info->name, "INBOX") != 0) {
+		/* e.g. INBOX/ namespace with INBOX/INBOX mailbox.
+		   we can't handle this properly with v2.0 API, but since
+		   it most likely doesn't even exist just skip it */
+		return local_worker_mailbox_iter_next(_iter, dsync_box_r);
+	}
 	dsync_str_sha_to_guid(storage_name, &dsync_box_r->name_sha1);
 
 	/* get last change timestamp */


More information about the dovecot-cvs mailing list