dovecot-2.0: mdbox: Make sure we don't try to append to a file w...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 6 22:03:53 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/874422af78b1
changeset: 11962:874422af78b1
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 06 20:03:44 2010 +0100
description:
mdbox: Make sure we don't try to append to a file we already closed.
diffstat:
src/lib-storage/index/dbox-multi/mdbox-map.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r 1aa2ccceacb9 -r 874422af78b1 src/lib-storage/index/dbox-multi/mdbox-map.c
--- a/src/lib-storage/index/dbox-multi/mdbox-map.c Fri Aug 06 19:02:57 2010 +0100
+++ b/src/lib-storage/index/dbox-multi/mdbox-map.c Fri Aug 06 20:03:44 2010 +0100
@@ -848,6 +848,12 @@
if (dbox_file_is_in_alt(append->file) != want_altpath)
continue;
+ if (append->file->fd == -1) {
+ /* already closed it (below). we might be able to still
+ fit some small mail there, but that's too much
+ trouble */
+ continue;
+ }
append_offset = append->output->offset;
if (append_offset + mail_size <= map->set->mdbox_rotate_size &&
More information about the dovecot-cvs
mailing list