Mercurial > dovecot > core-2.2
changeset 13482:3c8b44bb1974
dsync: If mailbox can't be opened, log an error but continue anyway.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 12 Sep 2011 16:32:20 +0300 |
parents | a930318a74a1 |
children | df8bd044a47d |
files | src/dsync/dsync-worker-local.c |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dsync/dsync-worker-local.c Mon Sep 12 14:27:46 2011 +0300 +++ b/src/dsync/dsync-worker-local.c Mon Sep 12 16:32:20 2011 +0300 @@ -521,6 +521,7 @@ struct local_dsync_mailbox_change *change; struct local_dsync_dir_change *dir_change, change_lookup; struct local_dsync_mailbox *old_lbox; + enum mail_error error; const char *const *fields; unsigned int i, field_count; @@ -560,8 +561,17 @@ struct mail_storage *storage = mailbox_get_storage(box); i_error("Failed to sync mailbox %s: %s", info->name, - mail_storage_get_last_error(storage, NULL)); + mail_storage_get_last_error(storage, &error)); mailbox_free(&box); + if (error == MAIL_ERROR_NOTFOUND || + error == MAIL_ERROR_NOTPOSSIBLE) { + /* Mailbox isn't selectable, try the next one. We + should have already caught \Noselect mailboxes, but + check them anyway here. The NOTPOSSIBLE check is + mainly for invalid mbox files. */ + return local_worker_mailbox_iter_next(_iter, + dsync_box_r); + } _iter->failed = TRUE; return -1; }