dovecot-1.2: Maildir: If POP3 UIDL field is empty in dovecot-uid...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Dec 18 19:34:40 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/c6facf63c7f9
changeset: 8567:c6facf63c7f9
user: Timo Sirainen <tss at iki.fi>
date: Thu Dec 18 19:34:35 2008 +0200
description:
Maildir: If POP3 UIDL field is empty in dovecot-uidlist, use base filename as UIDL.
diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
src/lib-storage/index/maildir/maildir-mail.c | 11 ++++++++++-
diffs (21 lines):
diff -r 1c462a3c21ba -r c6facf63c7f9 src/lib-storage/index/maildir/maildir-mail.c
--- a/src/lib-storage/index/maildir/maildir-mail.c Thu Dec 18 18:11:21 2008 +0200
+++ b/src/lib-storage/index/maildir/maildir-mail.c Thu Dec 18 19:34:35 2008 +0200
@@ -434,7 +434,16 @@ maildir_mail_get_special(struct mail *_m
case MAIL_FETCH_UIDL_BACKEND:
uidl = maildir_uidlist_lookup_ext(mbox->uidlist, _mail->uid,
MAILDIR_UIDLIST_REC_EXT_POP3_UIDL);
- *value_r = uidl != NULL ? uidl : "";
+ if (uidl == NULL) {
+ /* use the default */
+ *value_r = "";
+ } else if (*uidl == '\0') {
+ /* special optimization case: use the base file name */
+ return maildir_mail_get_special(_mail,
+ MAIL_FETCH_UIDL_FILE_NAME, value_r);
+ } else {
+ *value_r = uidl;
+ }
return 0;
default:
return index_mail_get_special(_mail, field, value_r);
More information about the dovecot-cvs
mailing list