[dovecot-cvs]
dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.149, 1.150
cras at dovecot.org
cras at dovecot.org
Sun Apr 17 18:53:45 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv22419/lib-storage/index/mbox
Modified Files:
mbox-sync.c
Log Message:
Don't break with empty mbox files when we're not delay-writing and the
mailbox hasn't always been empty.
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- mbox-sync.c 16 Apr 2005 19:31:21 -0000 1.149
+++ mbox-sync.c 17 Apr 2005 15:53:41 -0000 1.150
@@ -1558,8 +1558,10 @@
}
if (sync_ctx.base_uid_last != sync_ctx.next_uid-1 &&
- ret == 0 && !sync_ctx.delay_writes) {
- /* Rewrite uid_last in X-IMAPbase header. */
+ 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);
}
More information about the dovecot-cvs
mailing list