changeset 2940:0e1481357fbb HEAD

Changed assert() to friendly human readable message.
author Timo Sirainen <tss@iki.fi>
date Sun, 05 Dec 2004 05:42:43 +0200
parents 00b78082cd50
children 89ab5c72430d
files src/lib-index/mail-index.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index.c	Sun Dec 05 04:18:44 2004 +0200
+++ b/src/lib-index/mail-index.c	Sun Dec 05 05:42:43 2004 +0200
@@ -1176,8 +1176,12 @@
 
 		/* don't even bother to handle dotlocking without mmap being
 		   disabled. that combination simply doesn't make any sense */
-		i_assert(lock_method != MAIL_INDEX_LOCK_DOTLOCK ||
-			 index->mmap_disable);
+		if (lock_method == MAIL_INDEX_LOCK_DOTLOCK &&
+		    !index->mmap_disable) {
+			i_fatal("lock_method=dotlock and mmap_disable=no "
+				"combination isn't supported. "
+				"You don't _really_ want it anyway.");
+		}
 
 		ret = mail_index_open_files(index, flags);
 		if (ret <= 0)