Increment the seekable stream position by the number of bytes read. Oops.

2003-07-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-stream-fs.c (stream_read): Increment the seekable stream
	position by the number of bytes read. Oops.
	(stream_write): Same here.

svn path=/trunk/; revision=21862
This commit is contained in:
Jeffrey Stedfast
2003-07-17 19:17:42 +00:00
committed by Jeffrey Stedfast
parent 7b6185cbe1
commit 76c23a45f1
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@
* camel-stream-fs.c (stream_read): Increment the seekable stream
position by the number of bytes read. Oops.
(stream_write): Same here.
2003-07-17 Timo Sirainen <tss@iki.fi>

View File

@ -233,11 +233,15 @@ stream_write (CamelStream *stream, const char *buffer, size_t n)
{
CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream);
CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
ssize_t nwritten;
if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
n = MIN (seekable->bound_end - seekable->position, n);
return camel_write (stream_fs->fd, buffer, n);
if ((nwritten = camel_write (stream_fs->fd, buffer, n)) > 0)
seekable->position += nwritten;
return nwritten;
}
static int