From 7b6185cbe135d388e8bc872ab2a40fc67e1122f6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 17 Jul 2003 19:14:51 +0000 Subject: Increment the seekable stream position by the number of bytes read. Oops. 2003-07-17 Jeffrey Stedfast * camel-stream-fs.c (stream_read): Increment the seekable stream position by the number of bytes read. Oops. svn path=/trunk/; revision=21861 --- camel/ChangeLog | 5 +++++ camel/camel-stream-fs.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index a51b2ffeee..cc0e60e9ed 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2003-07-17 Jeffrey Stedfast + + * camel-stream-fs.c (stream_read): Increment the seekable stream + position by the number of bytes read. Oops. + 2003-07-17 Timo Sirainen ** See bug #42573 diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c index 9f67cd9e40..b86f146e59 100644 --- a/camel/camel-stream-fs.c +++ b/camel/camel-stream-fs.c @@ -220,7 +220,9 @@ stream_read (CamelStream *stream, char *buffer, size_t n) if (seekable->bound_end != CAMEL_STREAM_UNBOUND) n = MIN (seekable->bound_end - seekable->position, n); - if ((nread = camel_read (stream_fs->fd, buffer, n)) == 0) + if ((nread = camel_read (stream_fs->fd, buffer, n)) > 0) + seekable->position += nread; + else if (nread == 0) stream->eos = TRUE; return nread; -- cgit v1.2.3