Permalink
Browse files

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

  • Loading branch information...
1 parent abbf8be commit 9e20746611393c40c46a0152070b428f186ecc7d @bjori bjori committed Aug 29, 2011
Showing with 4 additions and 3 deletions.
  1. +3 −0 NEWS
  2. +1 −3 ext/phar/phar.c
View
3 NEWS
@@ -6,6 +6,9 @@ PHP NEWS
. Fixed bug #52461 (Incomplete doctype and missing xmlns).
(virsacer at web dot de, Pierre)
+- Phar:
+ . Fixed bug#52013 (Unable to decompress files in a compressed phar). (Hannes)
+
- NSAPI SAPI:
. Don't set $_SERVER['HTTPS'] on unsecure connection (bug #55403). (Uwe
Schindler)
View
@@ -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 */
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);
}

0 comments on commit 9e20746

Please sign in to comment.