Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7521:cb1c6c942768 HEAD
If file isn't found from uidlist, refresh the file and look again in case it
was added after the previous mailbox sync (but after the previous view sync
that found new messages).
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 15 May 2008 08:51:12 +0300 |
parents | 85203e817f90 |
children | abb4d2011b52 |
files | src/lib-storage/index/maildir/maildir-mail.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-mail.c Thu May 15 08:31:44 2008 +0300 +++ b/src/lib-storage/index/maildir/maildir-mail.c Thu May 15 08:51:12 2008 +0300 @@ -152,6 +152,14 @@ if (*fname_r != NULL) return TRUE; + /* refresh uidlist and check again in case it was added after the last + mailbox sync */ + if (maildir_uidlist_refresh(mbox->uidlist) < 0) + return FALSE; + *fname_r = maildir_uidlist_lookup(mbox->uidlist, mail->uid, &flags); + if (*fname_r != NULL) + return TRUE; + /* file exists in index file, but not in dovecot-uidlist anymore. */ mail_set_expunged(mail);