Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9542:a9710cb350c0 HEAD
maildir: Avoid infinite loops while reading uidlist.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 06 Feb 2010 21:05:18 +0200 |
parents | 99caf87fb3ce |
children | 4a6dd192c8af |
files | src/lib-storage/index/maildir/maildir-uidlist.c |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-uidlist.c Sat Feb 06 20:30:21 2010 +0200 +++ b/src/lib-storage/index/maildir/maildir-uidlist.c Sat Feb 06 21:05:18 2010 +0200 @@ -376,15 +376,11 @@ } mhdr = &uidlist->mbox->maildir_hdr; - if (mhdr->uidlist_mtime == 0) { - if (!uidlist->initial_read) - (void)maildir_uidlist_refresh(uidlist); - if (uidlist->version != UIDLIST_VERSION) { - /* upgrading from older verson. don't update the - uidlist times until it uses the new format */ - uidlist->recreate = TRUE; - return; - } + if (mhdr->uidlist_mtime == 0 && uidlist->version != UIDLIST_VERSION) { + /* upgrading from older verson. don't update the + uidlist times until it uses the new format */ + uidlist->recreate = TRUE; + return; } mhdr->uidlist_mtime = st->st_mtime; mhdr->uidlist_mtime_nsecs = ST_MTIME_NSEC(*st);