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

dovecot at dovecot.org dovecot at dovecot.org
Fri May 1 01:50:40 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/dcad675890c1
changeset: 9186:dcad675890c1
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 637b627efbf1 -r dcad675890c1 src/lib-storage/index/maildir/maildir-sync.c
--- a/src/lib-storage/index/maildir/maildir-sync.c	Thu Apr 30 18:41:43 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Thu Apr 30 18:49:26 2009 -0400
@@ -781,7 +781,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