Skip to content

Commit

Permalink
doveadm sync/backup: Don't override BROKENCHAR if it's already set
Browse files Browse the repository at this point in the history
This allows migrating invalid mailbox names by specifying BROKENCHAR.
Previously it would always try to use \003 control character, which isn't
valid character in mailbox names so the mailbox creation would fail.
  • Loading branch information
sirainen committed Feb 17, 2018
1 parent 5addf4e commit f45f472
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/doveadm/doveadm-dsync.c
Expand Up @@ -326,8 +326,10 @@ static void doveadm_user_init_dsync(struct mail_user *user)
struct mail_namespace *ns;

user->dsyncing = TRUE;
for (ns = user->namespaces; ns != NULL; ns = ns->next)
ns->list->set.broken_char = DSYNC_LIST_BROKEN_CHAR;
for (ns = user->namespaces; ns != NULL; ns = ns->next) {
if (ns->list->set.broken_char == '\0')
ns->list->set.broken_char = DSYNC_LIST_BROKEN_CHAR;
}
}

static bool paths_are_equal(struct mail_user *user1, struct mail_user *user2,
Expand Down

0 comments on commit f45f472

Please sign in to comment.