Bug #79912 [Ver->Dup]: Phar::decompressFiles not working
| From: | cmb@php.net | Date: | Tue, 19 Jan 2021 09:33:10 +0000 |
| Subject: | Bug #79912 [Ver->Dup]: Phar::decompressFiles not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231630@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: Verified
+Status: Duplicate
Type: Bug
Package: PHAR related
Operating System: MacOS
PHP Version: 7.4.8
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Actually, this appears to be a duplicate of bug #69279.
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