1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 04:32:19 +02:00

Fixed bug#52013 (Unable to decompress files in a compressed phar)

This commit is contained in:
Hannes Magnusson
2011-08-29 14:19:54 +00:00
parent 5519b2ebe1
commit 8a83fee12a

View File

@@ -3101,9 +3101,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert,
/* this will have changed for all files that have either changed compression or been modified */
entry->offset = entry->offset_abs = offset;
offset += entry->compressed_filesize;
phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote);
if (entry->compressed_filesize != wrote) {
if (phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote) == FAILURE) {
if (closeoldfile) {
php_stream_close(oldfile);
}