dovecot-1.2: maildir: Don't assert-crash if we have no read-acce...

dovecot at dovecot.org dovecot at dovecot.org
Fri May 1 01:49:31 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/cceea391d04d
changeset: 8997:cceea391d04d
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 30 18:49:26 2009 -0400
description:
maildir: Don't assert-crash if we have no read-access to the Maildir.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/lib-storage/index/maildir/maildir-sync.c |    5 ++++-

diffs (15 lines):

diff -r c34010571c02 -r cceea391d04d src/lib-storage/index/maildir/maildir-sync.c
--- a/src/lib-storage/index/maildir/maildir-sync.c	Thu Apr 30 16:17:56 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Thu Apr 30 18:49:26 2009 -0400
@@ -779,7 +779,10 @@ static int maildir_sync_context(struct m
 		ret = maildir_uidlist_sync_init(ctx->mbox->uidlist, sync_flags |
 						MAILDIR_UIDLIST_SYNC_NOLOCK,
 						&ctx->uidlist_sync_ctx);
-		i_assert(ret > 0);
+		if (ret <= 0) {
+			i_assert(ret != 0);
+			return -1;
+		}
 
 		if (storage->callbacks->notify_no != NULL) {
 			storage->callbacks->notify_no(&ctx->mbox->ibox.box,


More information about the dovecot-cvs mailing list