diff src/lib-storage/index/dbox-common/dbox-file.c @ 12800:fe144ecec678

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.
author Timo Sirainen <tss@iki.fi>
date Wed, 02 Mar 2011 15:51:28 +0200
parents 39f5ef8d612c
children 44d0474a451e
line wrap: on
line diff
--- 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);