dovecot-1.1: Rewrite X-IMAPbase: header before updating index fi...
dovecot at dovecot.org
dovecot at dovecot.org
Sat May 31 14:27:31 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/e528d9e3cdc8
changeset: 7584:e528d9e3cdc8
user: Timo Sirainen <tss at iki.fi>
date: Sat May 31 14:27:27 2008 +0300
description:
Rewrite X-IMAPbase: header before updating index file header, so that we
write the latest mtime as sync_stamp.
diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
src/lib-storage/index/mbox/mbox-sync.c | 16 ++++++++--------
diffs (33 lines):
diff -r a99b9735f875 -r e528d9e3cdc8 src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c Sat May 31 13:59:46 2008 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c Sat May 31 14:27:27 2008 +0300
@@ -1534,6 +1534,14 @@ static int mbox_sync_do(struct mbox_sync
ignore them, as we've overwritten them above. */
index_sync_changes_reset(sync_ctx->sync_changes);
+ if (sync_ctx->base_uid_last != sync_ctx->next_uid-1 &&
+ ret == 0 && !sync_ctx->delay_writes &&
+ sync_ctx->base_uid_last_offset != 0) {
+ /* Rewrite uid_last in X-IMAPbase header if we've seen it
+ (ie. the file isn't empty) */
+ ret = mbox_rewrite_base_uid_last(sync_ctx);
+ }
+
if (mbox_sync_update_index_header(sync_ctx) < 0)
return -1;
@@ -1791,14 +1799,6 @@ again:
sync_ctx.t = NULL;
sync_ctx.index_sync_ctx = NULL;
- if (sync_ctx.base_uid_last != sync_ctx.next_uid-1 &&
- ret == 0 && !sync_ctx.delay_writes &&
- sync_ctx.base_uid_last_offset != 0) {
- /* Rewrite uid_last in X-IMAPbase header if we've seen it
- (ie. the file isn't empty) */
- ret = mbox_rewrite_base_uid_last(&sync_ctx);
- }
-
if (ret == 0 && mbox->mbox_fd != -1 && mbox->ibox.keep_recent &&
!sync_ctx.mbox->mbox_readonly) {
/* try to set atime back to its original value */
More information about the dovecot-cvs
mailing list