]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Try creating INBOX before fallbacking to just updating it.
authorTimo Sirainen <tss@iki.fi>
Wed, 18 Nov 2009 00:25:28 +0000 (19:25 -0500)
committerTimo Sirainen <tss@iki.fi>
Wed, 18 Nov 2009 00:25:28 +0000 (19:25 -0500)
--HG--
branch : HEAD

src/dsync/dsync-worker-local.c

index 55effc19ebd2f8990d857f56500db32f89f43fe6..edcddc0b9618d2705a34b246159876152c528062 100644 (file)
@@ -890,12 +890,9 @@ local_worker_create_mailbox(struct dsync_worker *_worker,
        }
        local_worker_copy_mailbox_update(dsync_box, &update);
 
-       if (strcasecmp(dsync_box->name, "INBOX") == 0)
+       ret = mailbox_create(box, &update, dsync_box->uid_validity == 0);
+       if (ret < 0 && strcasecmp(dsync_box->name, "INBOX") == 0)
                ret = mailbox_update(box, &update);
-       else {
-               ret = mailbox_create(box, &update,
-                                    dsync_box->uid_validity == 0);
-       }
        if (ret < 0) {
                dsync_worker_set_failure(_worker);
                i_error("Can't create mailbox %s: %s", dsync_box->name,