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 authored and villesavolainen committed Feb 28, 2018
1 parent 481a6a1 commit 3087e07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/doveadm/doveadm-dsync.c
Expand Up @@ -317,8 +317,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 3087e07

Please sign in to comment.