dovecot-2.2: lib-index: Fixed resizing header when old&new sizes...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 27 20:45:15 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/ad78dcbe67be
changeset: 16401:ad78dcbe67be
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 27 20:44:56 2013 +0300
description:
lib-index: Fixed resizing header when old&new sizes were the same when aligned.

diffstat:

 src/lib-index/mail-index-sync-ext.c |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r a8bc96640cf0 -r ad78dcbe67be src/lib-index/mail-index-sync-ext.c
--- a/src/lib-index/mail-index-sync-ext.c	Mon May 27 20:44:05 2013 +0300
+++ b/src/lib-index/mail-index-sync-ext.c	Mon May 27 20:44:56 2013 +0300
@@ -289,6 +289,13 @@
 				   new_size - old_size);
 		ext->hdr_size = u->hdr_size;
 		modified = TRUE;
+	} else {
+		if (ext->hdr_size != u->hdr_size) {
+			/* aligned sizes were the same, but the actual sizes
+			   had changed */
+			ext->hdr_size = u->hdr_size;
+			modified = TRUE;
+		}
 	}
 
 	if (ext->record_align < u->record_align ||


More information about the dovecot-cvs mailing list