dovecot-1.1: If file isn't found from uidlist, refresh the file ...

dovecot at dovecot.org dovecot at dovecot.org
Thu May 15 08:51:15 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/cb1c6c942768
changeset: 7521:cb1c6c942768
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 15 08:51:12 2008 +0300
description:
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).

diffstat:

1 file changed, 8 insertions(+)
src/lib-storage/index/maildir/maildir-mail.c |    8 ++++++++

diffs (18 lines):

diff -r 85203e817f90 -r cb1c6c942768 src/lib-storage/index/maildir/maildir-mail.c
--- 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
@@ -148,6 +148,14 @@ maildir_mail_get_fname(struct maildir_ma
 	uint32_t seq;
 	bool exists;
 
+	*fname_r = maildir_uidlist_lookup(mbox->uidlist, mail->uid, &flags);
+	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;


More information about the dovecot-cvs mailing list