dovecot-2.2: fs-metawrap: Don't assert-crash when writing an emp...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 15 11:52:22 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/db8877fdd39f
changeset: 18856:db8877fdd39f
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 15 14:49:46 2015 +0300
description:
fs-metawrap: Don't assert-crash when writing an empty file.

diffstat:

 src/lib-fs/fs-metawrap.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r cf99661dca25 -r db8877fdd39f src/lib-fs/fs-metawrap.c
--- a/src/lib-fs/fs-metawrap.c	Mon Jun 15 14:35:25 2015 +0300
+++ b/src/lib-fs/fs-metawrap.c	Mon Jun 15 14:49:46 2015 +0300
@@ -457,7 +457,7 @@
 		/* fs_stat() after a write. we can do this quickly. */
 		if (fs_stat(file->super, st_r) < 0)
 			return -1;
-		i_assert((uoff_t)st_r->st_size > file->metadata_write_size);
+		i_assert((uoff_t)st_r->st_size >= file->metadata_write_size);
 		st_r->st_size -= file->metadata_write_size;
 		return 0;
 	}


More information about the dovecot-cvs mailing list