Skip to content

Commit

Permalink
Fixed bug#52013 (Unable to decompress files in a compressed phar)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjori committed Aug 29, 2011
1 parent abbf8be commit 9e20746
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ PHP NEWS
. Fixed bug #52461 (Incomplete doctype and missing xmlns). . Fixed bug #52461 (Incomplete doctype and missing xmlns).
(virsacer at web dot de, Pierre) (virsacer at web dot de, Pierre)


- Phar:
. Fixed bug#52013 (Unable to decompress files in a compressed phar). (Hannes)

- NSAPI SAPI: - NSAPI SAPI:
. Don't set $_SERVER['HTTPS'] on unsecure connection (bug #55403). (Uwe . Don't set $_SERVER['HTTPS'] on unsecure connection (bug #55403). (Uwe
Schindler) Schindler)
Expand Down
4 changes: 1 addition & 3 deletions ext/phar/phar.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3103,9 +3103,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 */ /* this will have changed for all files that have either changed compression or been modified */
entry->offset = entry->offset_abs = offset; entry->offset = entry->offset_abs = offset;
offset += entry->compressed_filesize; offset += entry->compressed_filesize;
phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote); if (phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote) == FAILURE) {

if (entry->compressed_filesize != wrote) {
if (closeoldfile) { if (closeoldfile) {
php_stream_close(oldfile); php_stream_close(oldfile);
} }
Expand Down

0 comments on commit 9e20746

Please sign in to comment.