From 40a610887d90837153275582104f31afb3e5c5f1 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 28 Feb 2006 14:44:23 +0000 Subject: - Need to set eof flag when inner stream has eof condition --- ext/phar/phar.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 1586d42f7e..01ec4970a7 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1028,7 +1028,13 @@ static size_t phar_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) / { phar_entry_data *data = (phar_entry_data *)stream->abstract; - return php_stream_read(data->fp, buf, count); + size_t got = php_stream_read(data->fp, buf, count); + + if (data->fp->eof) { + stream->eof = 1; + } + + return got; } /* }}} */ -- cgit v1.2.1