Bug #76584 [Ver->Csd]: PharFileInfo::decompress not working

From: Date: Tue, 28 Jan 2020 09:41:27 +0000
Subject: Bug #76584 [Ver->Csd]: PharFileInfo::decompress not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225185@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76584&edit=1

 ID:                 76584
 Updated by:         cmb@php.net
 Reported by:        thenewherobrinex at gmail dot com
 Summary:            PharFileInfo::decompress not working
-Status:             Verified
+Status:             Closed
 Type:               Bug
 Package:            PHAR related
 Operating System:   Mac/Linux
 PHP Version:        7.3.5
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=136f51f1e1ce25a7d0150857d0846be8c8415a44
Log: Fix #76584: PharFileInfo::decompress not working


Previous Comments:
------------------------------------------------------------------------
[2020-01-26 14:07:43] cmb@php.net

The following pull request has been associated:

Patch Name: Fix #76584: PharFileInfo::decompress not working
On GitHub:  https://github.com/php/php-src/pull/5115
Patch:      https://github.com/php/php-src/pull/5115.patch

------------------------------------------------------------------------
[2019-05-06 22:21:44] thenewherobrinex at gmail dot com

I just tested and I noticed that this bug is still there in 7.3.5

------------------------------------------------------------------------
[2018-07-05 21:21:08] thenewherobrinex at gmail dot com

Description:
------------
PharFileInfo::decompress marks the file in the phar as not compressed but when you extract the file
from the phar it will be compressed.

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($file->decompress()); //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=76584&edit=1


Thread (5 messages)

« previous php.bugs (#225185) next »