bjori Mon, 29 Aug 2011 14:19:54 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315703
Log: Fixed bug#52013 (Unable to decompress files in a compressed phar) Bug: https://bugs.php.net/52013 (Assigned) Unable to decompress files in a compressed phar. Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/phar.c U php/php-src/branches/PHP_5_4/ext/phar/phar.c U php/php-src/trunk/ext/phar/phar.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2011-08-29 14:17:41 UTC (rev 315702) +++ php/php-src/branches/PHP_5_3/NEWS 2011-08-29 14:19:54 UTC (rev 315703) @@ -6,6 +6,9 @@ . 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) Modified: php/php-src/branches/PHP_5_3/ext/phar/phar.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/phar/phar.c 2011-08-29 14:17:41 UTC (rev 315702) +++ php/php-src/branches/PHP_5_3/ext/phar/phar.c 2011-08-29 14:19:54 UTC (rev 315703) @@ -3103,9 +3103,7 @@ /* 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); } Modified: php/php-src/branches/PHP_5_4/ext/phar/phar.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/phar/phar.c 2011-08-29 14:17:41 UTC (rev 315702) +++ php/php-src/branches/PHP_5_4/ext/phar/phar.c 2011-08-29 14:19:54 UTC (rev 315703) @@ -3101,9 +3101,7 @@ /* 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); } Modified: php/php-src/trunk/ext/phar/phar.c =================================================================== --- php/php-src/trunk/ext/phar/phar.c 2011-08-29 14:17:41 UTC (rev 315702) +++ php/php-src/trunk/ext/phar/phar.c 2011-08-29 14:19:54 UTC (rev 315703) @@ -3101,9 +3101,7 @@ /* 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); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php