dovecot-1.2: file_set_size() was broken with OSes that didn't su...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 28 19:57:15 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/aaa1b2c25c14
changeset: 9343:aaa1b2c25c14
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 28 12:57:03 2009 -0400
description:
file_set_size() was broken with OSes that didn't support posix_fallocate().

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib/file-set-size.c |    2 +-

diffs (12 lines):

diff -r aeb3affa0501 -r aaa1b2c25c14 src/lib/file-set-size.c
--- a/src/lib/file-set-size.c	Fri Aug 28 11:37:45 2009 -0400
+++ b/src/lib/file-set-size.c	Fri Aug 28 12:57:03 2009 -0400
@@ -72,7 +72,7 @@ int file_set_size(int fd, off_t size)
 				i_error("pwrite() failed: %m");
 			return -1;
 		}
-		offset += size;
+		offset += ret;
 	}
 	return 0;
 }


More information about the dovecot-cvs mailing list