dovecot-2.0: mdbox: Storage rebuilding may have skipped over mes...

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 2 15:52:12 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/fe144ecec678
changeset: 12631:fe144ecec678
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 02 15:51:28 2011 +0200
description:
mdbox: Storage rebuilding may have skipped over messages if the file was already at EOF.
Probably didn't happen except when purging noticed corruption and triggered
index rebuild.

diffstat:

 src/lib-storage/index/dbox-common/dbox-file.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (21 lines):

diff -r 965b9019ef2e -r fe144ecec678 src/lib-storage/index/dbox-common/dbox-file.c
--- a/src/lib-storage/index/dbox-common/dbox-file.c	Wed Mar 02 14:57:58 2011 +0200
+++ b/src/lib-storage/index/dbox-common/dbox-file.c	Wed Mar 02 15:51:28 2011 +0200
@@ -437,13 +437,13 @@
 			*offset_r = file->cur_offset;
 			return ret;
 		}
+		if (i_stream_is_eof(file->input)) {
+			*last_r = TRUE;
+			return 0;
+		}
 	}
 	*offset_r = offset;
 
-	if (i_stream_is_eof(file->input)) {
-		*last_r = TRUE;
-		return 0;
-	}
 	*last_r = FALSE;
 
 	ret = dbox_file_seek(file, offset);


More information about the dovecot-cvs mailing list