changeset 7540:30a97495c7bf HEAD

dbox: Some mails could have been written using m.* files, even though everything was supposed to be u.* for now.
author Timo Sirainen <tss@iki.fi>
date Sun, 25 May 2008 02:50:06 +0300
parents dd378ab0263e
children a2a199667c05
files src/lib-storage/index/dbox/dbox-file.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-file.c	Sun May 25 01:52:17 2008 +0300
+++ b/src/lib-storage/index/dbox/dbox-file.c	Sun May 25 02:50:06 2008 +0300
@@ -757,8 +757,13 @@
 {
 	int ret;
 
-	if (file->nonappendable)
-		return 0;
+	if (file->append_count == 0) {
+		if (file->nonappendable)
+			return 0;
+	} else {
+		if (!dbox_file_can_append(file, mail_size))
+			return 0;
+	}
 
 	ret = dbox_file_get_append_stream_int(file, mail_size, stream_r);
 	if (ret == 0)