[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.9, 1.10

tss at dovecot.org tss at dovecot.org
Sat Nov 18 21:48:15 UTC 2006


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

Modified Files:
	maildir-keywords.c 
Log Message:
If we can't open dovecot-keywords file, don't crash.



Index: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- maildir-keywords.c	10 Sep 2006 12:48:26 -0000	1.9
+++ maildir-keywords.c	18 Nov 2006 21:48:13 -0000	1.10
@@ -204,7 +204,10 @@
 	idx = maildir_keywords_lookup(mk, name);
 	if (idx >= 0)
 		return idx;
-	i_assert(mk->synced);
+	if (!mk->synced) {
+		/* we couldn't open the dovecot-keywords file. */
+		return -1;
+	}
 
 	/* see if we are full */
 	keywords = array_get(&mk->list, &count);



More information about the dovecot-cvs mailing list