From: Timo Sirainen Date: Tue, 6 Jul 2010 18:14:39 +0000 (+0100) Subject: dsync: Refuse to run if we detect virtual hierarchy separators differ for mail locations. X-Git-Tag: 2.0.rc2~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f39198a55e2d33c2e7fe08cb78cb7096a5a9ec50;p=thirdparty%2Fdovecot%2Fcore.git dsync: Refuse to run if we detect virtual hierarchy separators differ for mail locations. The real separators can differ, but to work properly there must be a default namespace with a separator defined. --HG-- branch : HEAD --- diff --git a/src/dsync/dsync.c b/src/dsync/dsync.c index 50276f8a7d..f4fd464a9c 100644 --- a/src/dsync/dsync.c +++ b/src/dsync/dsync.c @@ -8,6 +8,7 @@ #include "master-service-settings.h" #include "mail-storage-service.h" #include "mail-user.h" +#include "mail-namespace.h" #include "dsync-brain.h" #include "dsync-worker.h" #include "dsync-proxy-server.h" @@ -256,6 +257,13 @@ int main(int argc, char *argv[]) &mail_user2) < 0) i_fatal("User init failed"); + if (mail_namespaces_get_root_sep(mail_user->namespaces) != + mail_namespaces_get_root_sep(mail_user2->namespaces)) { + i_fatal("Mail locations must use the same " + "virtual mailbox hierarchy separator " + "(specify separator for the default namespace)"); + } + worker2 = dsync_worker_init_local(mail_user2, alt_char); if (reverse_workers) { workertmp = worker1;