changeset 5226:aca6d339de01 HEAD

If moving to memory fails, make sure we open the index with create flag set.
author Timo Sirainen <tss@iki.fi>
date Tue, 06 Mar 2007 21:54:23 +0200
parents 0a45db96e288
children 7838ae62b1e6
files src/lib-storage/index/index-storage.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-storage.c	Tue Mar 06 21:51:24 2007 +0200
+++ b/src/lib-storage/index/index-storage.c	Tue Mar 06 21:54:23 2007 +0200
@@ -347,6 +347,7 @@
 		if (mail_index_move_to_memory(ibox->index) < 0) {
 			/* try opening once more. it should be created
 			   directly into memory now. */
+			index_flags |= MAIL_INDEX_OPEN_FLAG_CREATE;
 			ret = mail_index_open(ibox->index, index_flags,
 					      storage->lock_method);
 			if (ret <= 0)