aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-stream-fs.c')
-rw-r--r--camel/camel-stream-fs.c4
1 files changed, 3 insertions, 1 deletions
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;