dovecot-1.2: ostream: When copying backwards within a file, upda...

dovecot at dovecot.org dovecot at dovecot.org
Wed Feb 25 01:13:40 EET 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/52e0b40146b1
changeset: 8778:52e0b40146b1
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Feb 24 18:11:18 2009 -0500
description:
ostream: When copying backwards within a file, update in/outstream offsets.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/lib/ostream-file.c |    6 ++++--

diffs (16 lines):

diff -r ff1d88068275 -r 52e0b40146b1 src/lib/ostream-file.c
--- a/src/lib/ostream-file.c	Tue Feb 24 17:16:38 2009 -0500
+++ b/src/lib/ostream-file.c	Tue Feb 24 18:11:18 2009 -0500
@@ -764,8 +764,10 @@ static off_t io_stream_copy_backwards(st
 			outstream->ostream.stream_errno = errno;
 			return -1;
 		}
-	}
-
+		i_stream_skip(instream, size);
+	}
+
+	outstream->ostream.offset += in_size - in_start_offset;
 	return (off_t) (in_size - in_start_offset);
 }
 


More information about the dovecot-cvs mailing list