Mercurial > dovecot > core-2.2
changeset 10963:d87741f0e95a HEAD
sdbox: Don't break when trying to access mail that's just being expunged.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 21 Mar 2010 16:50:11 +0200 |
parents | b7d7b44fcbc8 |
children | cc42255736ad |
files | src/lib-storage/index/dbox-single/sdbox-mail.c |
diffstat | 1 files changed, 4 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-single/sdbox-mail.c Fri Mar 19 21:40:13 2010 +0200 +++ b/src/lib-storage/index/dbox-single/sdbox-mail.c Sun Mar 21 16:50:11 2010 +0200 @@ -15,17 +15,11 @@ static void sdbox_mail_set_expunged(struct dbox_mail *mail) { struct mail *_mail = &mail->imail.mail.mail; - struct sdbox_mailbox *mbox = (struct sdbox_mailbox *)_mail->box; - (void)mail_index_refresh(_mail->box->index); - if (mail_index_is_expunged(_mail->transaction->view, _mail->seq)) { - mail_set_expunged(_mail); - return; - } - - mail_storage_set_critical(_mail->box->storage, - "Unexpectedly lost uid=%u", _mail->uid); - mbox->sync_rebuild = TRUE; + /* syncing code first unlinks the file, and index is updated later. + so at this point we don't know if the file was unexpectedly lost + or if it's just being expunged. just assume the latter. */ + mail_set_expunged(_mail); } static bool sdbox_mail_file_set(struct dbox_mail *mail)