Mercurial > dovecot > original-hg > dovecot-1.2
changeset 147:e35df75f639d HEAD
Hash wasn't updated when compressing the index
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 04 Sep 2002 13:58:06 +0300 |
parents | 124856b82684 |
children | 00b6ffc4d342 |
files | src/lib-index/mail-index-compress.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-compress.c Wed Sep 04 02:08:20 2002 +0300 +++ b/src/lib-index/mail-index-compress.c Wed Sep 04 13:58:06 2002 +0300 @@ -5,6 +5,7 @@ #include "mail-index.h" #include "mail-index-data.h" #include "mail-index-util.h" +#include "mail-hash.h" #include <stdio.h> #include <unistd.h> @@ -41,6 +42,8 @@ while (rec < end_rec) { if (rec->uid != 0) { memcpy(hole_rec, rec, sizeof(MailIndexRecord)); + mail_hash_update(index->hash, rec->uid, + INDEX_FILE_POSITION(index, hole_rec)); hole_rec++; } rec++; @@ -88,7 +91,7 @@ return FALSE; } - /* no we'll begin the actual moving. keep rebuild-flag on + /* now we'll begin the actual moving. keep rebuild-flag on while doing it. */ index->header->flags |= MAIL_INDEX_FLAG_REBUILD; if (!mail_index_fmsync(index, sizeof(MailIndexHeader)))