# HG changeset patch # User Timo Sirainen # Date 1197210437 -7200 # Node ID c8df2492959e54381a897d84079bcd072beb816c # Parent 66b439e24c47a28456c17cd06e96ba64b32bc067 Don't rebuild dbox if another process had done it already by the time we got the mailbox locked. diff -r 66b439e24c47 -r c8df2492959e src/lib-storage/index/dbox/dbox-sync.c --- a/src/lib-storage/index/dbox/dbox-sync.c Sun Dec 09 16:20:35 2007 +0200 +++ b/src/lib-storage/index/dbox/dbox-sync.c Sun Dec 09 16:27:17 2007 +0200 @@ -317,6 +317,10 @@ return ret; } + if (rebuild && dbox_sync_want_flush_dirty(mbox, FALSE) >= 0) { + /* another process rebuilt it already */ + rebuild = FALSE; + } if (rebuild) { ret = 0; rebuild = FALSE;