Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2663:cecf6f5a0d80 HEAD
If only mbox timestamp changes, do a full sync.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 24 Sep 2004 14:18:50 +0300 |
parents | add94f9aa9e1 |
children | f54b0f04c628 |
files | src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c Fri Sep 24 01:29:13 2004 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Fri Sep 24 14:18:50 2004 +0300 @@ -1091,8 +1091,12 @@ /* file is fully synced */ sync_ctx->ibox->mbox_sync_dirty = FALSE; min_msg_count = 0; - } else if ((flags & MBOX_SYNC_UNDIRTY) != 0) { - /* we want to do full syncing */ + } else if ((flags & MBOX_SYNC_UNDIRTY) != 0 || + (uint64_t)st.st_size == sync_ctx->hdr->sync_size) { + /* we want to do full syncing. always do this if + file size hasn't changed but timestamp has. it most + likely means that someone had modified some header + and we probably want to know about it */ min_msg_count = (uint32_t)-1; sync_ctx->ibox->mbox_sync_dirty = TRUE; } else {