]> granicus.if.org Git - php/commitdiff
- Need to set eof flag when inner stream has eof condition
authorMarcus Boerger <helly@php.net>
Tue, 28 Feb 2006 14:44:23 +0000 (14:44 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 28 Feb 2006 14:44:23 +0000 (14:44 +0000)
ext/phar/phar.c

index 1586d42f7e70a15a35514045698632c1efd1e7c5..01ec4970a72f5faa869c4d95d88e9135a66eee1d 100644 (file)
@@ -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;
 }
 /* }}} */