Bug #79912 [NEW]: Phar::decompressFiles not working
| From: | thenewherobrinex at gmail dot com | Date: | Wed, 29 Jul 2020 16:17:17 +0000 |
| Subject: | Bug #79912 [NEW]: Phar::decompressFiles not working | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228279@lists.php.net to get a copy of this message | ||
From: thenewherobrinex at gmail dot com
Operating system: MacOS
PHP version: 7.4.8
Package: PHAR related
Bug Type: Bug
Bug description:Phar::decompressFiles not working
Description:
------------
Phar::decompressFiles marks the files in the PHAR as not compressed but
when you extract the files from the PHAR they will be still compressed.
This is the same exact issue as https://bugs.php.net/bug.php?id=76584
just with Phar::decompressFiles instead of PharFileInfo::decompress.
Test script:
---------------
<?php
file_put_contents("test.txt", "This is a test file.");
$phar = new Phar("test.phar");
$phar->addFile("test.txt");
$file = $phar["test.txt"];
var_dump($file->compress(Phar::GZ)); //true (success)
var_dump($file->isCompressed()); //true (the file is compressed)
var_dump($phar->decompressFiles()); //true (success)
var_dump($file->isCompressed()); //false (the file should not be
compressed anymore)
var_dump($phar->extractTo("test")); //true (success but the extracted
file in the folder is compressed)
--
Edit bug report at https://bugs.php.net/bug.php?id=79912&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79912&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79912&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79912&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79912&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79912&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79912&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79912&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79912&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79912&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79912&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79912&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79912&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79912&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79912&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79912&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79912&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79912&r=mysqlcfg