Bug #76475 [Com]: phar buildFromIterator misses some directory informations

From: Date: Fri, 15 Jun 2018 08:09:57 +0000
Subject: Bug #76475 [Com]: phar buildFromIterator misses some directory informations
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215733@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76475&edit=1 ID: 76475 Comment by: dams@php.net Reported by: dams@php.net Summary: phar buildFromIterator misses some directory informations Status: Open Type: Bug Package: PHAR related Operating System: OSX PHP Version: 7.2.6 Block user comment: N Private report: N New Comment: Here is the link to the code : https://gist.github.com/dseguy/1074014a63509da970c48aac87d8761f#file-phar-buildfromiterator Previous Comments: ------------------------------------------------------------------------ [2018-06-14 10:38:08] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76475&edit=1

« previous php.bugs (#215733) next »