Bug #79912 [Opn->Ver]: Phar::decompressFiles not working
| From: | cmb@php.net | Date: | Tue, 08 Dec 2020 13:46:25 +0000 |
| Subject: | Bug #79912 [Opn->Ver]: Phar::decompressFiles not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230940@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79912&edit=1
ID: 79912
Updated by: cmb@php.net
Reported by: thenewherobrinex at gmail dot com
Summary: Phar::decompressFiles not working
-Status: Open
+Status: Verified
Type: Bug
Package: PHAR related
Operating System: MacOS
PHP Version: 7.4.8
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2020-07-29 16:17:17] thenewherobrinex at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=79912&edit=1