php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #72046 PharData::buildFromIterator() directory support
Submitted: 2016-04-17 21:56 UTC Modified: -
From: tklingenberg at lastflood dot net Assigned:
Status: Open Package: PHAR related
PHP Version: 5.6.20 OS: Linux
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: tklingenberg at lastflood dot net
New email:
PHP Version: OS:

 

 [2016-04-17 21:56 UTC] tklingenberg at lastflood dot net
Description:
------------
When building from an iterator, the iterator can return SplFileInfo objects.

These can represent a *file* or a *directory*.

Right now each iteration is treated as a file.

It would be great to support directories as well and whenever encountering a directory SplFileInfo to add it's path as empty directory (compare PharData::addEmptyDir())



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-17 22:01 UTC] tklingenberg at lastflood dot net
Previous behaviour (#46060) that was fixed for addDir() is now still on itertor process with a directory: Directory path as zero-byte file.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 20 00:01:24 2020 UTC