changeset 2896:305476a6f8ed HEAD

When we actually read index file's header make sure it gets copied to memory so log file offsets get updated.
author Timo Sirainen <tss@iki.fi>
date Thu, 25 Nov 2004 01:05:01 +0200
parents 51be21fc2c9d
children 90697bb3c368
files src/lib-index/mail-index.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index.c	Wed Nov 24 22:42:02 2004 +0200
+++ b/src/lib-index/mail-index.c	Thu Nov 25 01:05:01 2004 +0200
@@ -621,6 +621,12 @@
 	mail_index_view_close(view);
 	mail_transaction_log_view_close(log_view);
 
+	if (sync_to_index) {
+		/* make sure log file offsets get copied. most of the other
+		   fields should stay the same. */
+		map->hdr = hdr;
+	}
+
 	index->map = NULL;
 	return ret < 0 ? -1 : 1;
 }