]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Sync also namespaces where empty location setting came from userdb or -o parameter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 30 Nov 2022 12:48:13 +0000 (14:48 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 30 Nov 2022 12:48:55 +0000 (14:48 +0200)
src/doveadm/dsync/dsync-brain.c

index e6b974e963a5604215e29702d0ae5e46f6a02f06..a47e85c36b283406c5b60e49fe3a837284b5e1e4 100644 (file)
@@ -882,8 +882,13 @@ bool dsync_brain_want_namespace(struct dsync_brain *brain,
                        return TRUE;
                return FALSE;
        } else {
+               /* By default sync only namespaces that have empty location.
+                  The unexpanded_location can be already expanded if it
+                  came from userdb or -o parameter. */
                return strcmp(ns->set->unexpanded_location,
-                             SETTING_STRVAR_UNEXPANDED) == 0;
+                             SETTING_STRVAR_UNEXPANDED) == 0 ||
+                       strcmp(ns->set->unexpanded_location,
+                              SETTING_STRVAR_EXPANDED) == 0;
        }
 }