[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-rewrite.c, 1.49, 1.50 mbox-sync-update.c, 1.35, 1.36

cras at dovecot.org cras at dovecot.org
Sat May 14 15:51:30 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv8428

Modified Files:
	mbox-sync-rewrite.c mbox-sync-update.c 
Log Message:
uid-last offset change fixes.



Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- mbox-sync-rewrite.c	26 Apr 2005 14:07:31 -0000	1.49
+++ mbox-sync-rewrite.c	14 May 2005 12:51:28 -0000	1.50
@@ -288,8 +288,10 @@
 		return -1;
 	}
 
-	if (ctx->imapbase_updated) {
-		i_assert(sync_ctx->dest_first_mail);
+	if (sync_ctx->dest_first_mail &&
+	    (ctx->imapbase_updated || ctx->sync_ctx->base_uid_last != 0)) {
+		/* the position might have moved as a result of moving
+		   whitespace */
 		mbox_sync_first_mail_written(ctx, ctx->hdr_offset + move_diff);
 	}
 

Index: mbox-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-update.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- mbox-sync-update.c	29 Apr 2005 12:46:59 -0000	1.35
+++ mbox-sync-update.c	14 May 2005 12:51:28 -0000	1.36
@@ -42,8 +42,6 @@
 			    ctx->hdr_pos[i] != (size_t)-1)
 				ctx->hdr_pos[i] += diff;
 		}
-		if (ctx->sync_ctx->dest_first_mail)
-			ctx->sync_ctx->base_uid_last_offset += diff;
 
 		if (diff < 0)
 			str_delete(ctx->header, pos, -diff);



More information about the dovecot-cvs mailing list