Bug #54289 [Ana]: Phar::extractTo() does not accept specific directories to be extracted
From: bishop@php.net Date: Sat, 06 Jan 2018 07:26:28 +0000 Subject: Bug #54289 [Ana]: Phar::extractTo() does not accept specific directories to be extracted References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-213395@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54289&edit=1
ID: 54289
Updated by: bishop@php.net
Reported by: hpdl at oscommerce dot com
Summary: Phar::extractTo() does not accept specific
directories to be extracted
Status: Analyzed
Type: Bug
Package: PHAR related
Operating System: MacOS 10.6.6
PHP Version: 5.3.5
Assigned To: bishop
Block user comment: N
Private report: N
New Comment:
Correction: that should be PR #3009
https://github.com/php/php-src/pull/3009
Previous Comments:
------------------------------------------------------------------------
[2018-01-06 06:52:56] bishop@php.net
Proposed fix at PR 3008
https://github.com/php/php-src/pull/3008
------------------------------------------------------------------------
[2018-01-06 05:25:28] bishop@php.net
Occurs because the extractTo implementation scans the manifest -- which only contains file leaves. A
pattern based scan is called for here.
------------------------------------------------------------------------
[2015-01-02 14:49:29] kassner@php.net
Reproducible on PHP 5.6.4.
------------------------------------------------------------------------
[2011-08-27 06:28:17] cweiske@php.net
I can confirm that - extracting directories does not work:
PHP Fatal error: Uncaught exception 'PharException' with message
'Phar Error: attempted to extract non-existent file "doc/" from phar
"/home/cweiske/Dev/semanticscuttle/cwdev/dist/SemanticScuttle-0.98.X.phar"'
in /home/cweiske/Dev/semanticscuttle/cwdev/phartest.php:3
Stack trace:
#0 /home/cweiske/Dev/semanticscuttle/cwdev/phartest.php(3):
Phar->extractTo('/tmp/test/', 'doc/', true)
#1 {main}
thrown in /home/cweiske/Dev/semanticscuttle/cwdev/phartest.php on line 3
------------------------------------------------------------------------
[2011-08-11 20:33:50] hpdl at oscommerce dot com
Bug still exists in PHP 5.3.7RC5.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=54289
--
Edit this bug report at https://bugs.php.net/bug.php?id=54289&edit=1
Thread (11 messages)
- Bug #54289 [Com]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Com]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Com]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Opn->Ver]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Ver->Asn]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Asn->Opn]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Opn->Ana]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Ana]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Ana]: Phar::extractTo() does not accept specific directories to be extracted
- Bug #54289 [Ana->Csd]: Phar::extractTo() does not accept specific directories to be extracted
| « previous | php.bugs (#213395) | next » |
|---|