Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib-storage/index/dbox/dbox-file.c @ 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 | 81994d76fd24 |
children | cf924043234d |
comparison
equal
deleted
inserted
replaced
7539:dd378ab0263e | 7540:30a97495c7bf |
---|---|
755 int dbox_file_get_append_stream(struct dbox_file *file, uoff_t mail_size, | 755 int dbox_file_get_append_stream(struct dbox_file *file, uoff_t mail_size, |
756 struct ostream **stream_r) | 756 struct ostream **stream_r) |
757 { | 757 { |
758 int ret; | 758 int ret; |
759 | 759 |
760 if (file->nonappendable) | 760 if (file->append_count == 0) { |
761 return 0; | 761 if (file->nonappendable) |
762 return 0; | |
763 } else { | |
764 if (!dbox_file_can_append(file, mail_size)) | |
765 return 0; | |
766 } | |
762 | 767 |
763 ret = dbox_file_get_append_stream_int(file, mail_size, stream_r); | 768 ret = dbox_file_get_append_stream_int(file, mail_size, stream_r); |
764 if (ret == 0) | 769 if (ret == 0) |
765 file->nonappendable = TRUE; | 770 file->nonappendable = TRUE; |
766 return ret; | 771 return ret; |