unsigned int anon_mmap:1;
unsigned int mmap_invalidate:1;
+ unsigned int mbox_rewritten:1;
unsigned int opened:1;
unsigned int rebuilding:1;
unsigned int mail_read_mmaped:1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
- 0
+ 0, 0
#endif
/* defaults - same as above but prefixed with mail_index_. */
return TRUE;
}
+ /* kludgy .. but we need to force resyncing */
+ index->mbox_rewritten = TRUE;
+
tmp_fd = -1; input = NULL;
failed = TRUE; rewrite = FALSE;
do {
failed = !mbox_sync_from_stream(index, input);
}
+ if (index->mbox_rewritten) {
+ /* rewritten, sync again */
+ index->mbox_rewritten = FALSE;
+ i_stream_seek(input, 0);
+ failed = !mbox_sync_from_stream(index, input);
+ }
+
i_stream_unref(input);
}