php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76475 phar buildFromIterator misses some directory informations
Submitted: 2018-06-14 10:38 UTC Modified: -
From: dams@php.net Assigned:
Status: Open Package: PHAR related
PHP Version: 7.2.6 OS: OSX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dams@php.net
New email:
PHP Version: OS:

 

 [2018-06-14 10:38 UTC] dams@php.net
Description:
------------
When building a phar with addFile, it is possible to list the folders with scandir or opendir. 
When building the same phar with buildFromIterator, some of the folders in the phar archive can't be read. I get the following error : 

PHP Warning:  scandir(phar:///tmp/iterator.phar/folder/sub): failed to open dir: operation failed in phar:///tmp/iterator.phar/test on line 3

Test script:
---------------
The attached gist creates a few files, and build 2 phar with the same structure.
The one created with iterator fails, while the other one is OK, displaying a folder listing.

Expected result:
----------------
Building phar with archives allows for all folder listing.

Actual result:
--------------
error when using scandir, opendir in the phar. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 01:01:23 2019 UTC