# HG changeset patch # User Timo Sirainen # Date 1184088039 -10800 # Node ID 90de57daa0d4da1b6d37d188960550e897f9d5ca # Parent b985e2127a2d0525b960c5807fc09eb2e90457ee Fixed UIDVALIDITY changed error when dovecot-uidlist file didn't exist but index already had UIDVALIDITY. diff -r b985e2127a2d -r 90de57daa0d4 src/lib-storage/index/maildir/maildir-uidlist.c --- a/src/lib-storage/index/maildir/maildir-uidlist.c Mon Jul 09 07:31:28 2007 +0300 +++ b/src/lib-storage/index/maildir/maildir-uidlist.c Tue Jul 10 20:20:39 2007 +0300 @@ -1060,11 +1060,6 @@ void maildir_uidlist_sync_finish(struct maildir_uidlist_sync_ctx *ctx) { - if (ctx->uidlist->uid_validity == 0) { - /* saving a message to a newly created maildir */ - ctx->uidlist->uid_validity = ioloop_time; - } - if (!ctx->partial) { if (!ctx->failed) maildir_uidlist_swap(ctx); @@ -1082,6 +1077,8 @@ struct maildir_uidlist_sync_ctx *ctx = *_ctx; int ret = ctx->failed ? -1 : 0; + i_assert(ctx->uidlist->uid_validity != 0); + *_ctx = NULL; if (!ctx->finished)