[Config] skip dots in getFilteredChilds() (fixes test suite on Linux)
This commit is contained in:
parent
c9eaa72e2f
commit
ece489f4b9
@ -40,8 +40,17 @@ class DirectoryResource implements ResourceInterface
|
|||||||
*/
|
*/
|
||||||
public function getFilteredChilds()
|
public function getFilteredChilds()
|
||||||
{
|
{
|
||||||
|
if (!$this->exists()) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$iterator = new \RecursiveIteratorIterator(
|
||||||
|
new \RecursiveDirectoryIterator($this->resource, \FilesystemIterator::SKIP_DOTS),
|
||||||
|
\RecursiveIteratorIterator::SELF_FIRST
|
||||||
|
);
|
||||||
|
|
||||||
$childs = array();
|
$childs = array();
|
||||||
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) {
|
foreach ($iterator as $file) {
|
||||||
// if regex filtering is enabled only return matching files
|
// if regex filtering is enabled only return matching files
|
||||||
if ($file->isFile() && !$this->hasFile($file)) {
|
if ($file->isFile() && !$this->hasFile($file)) {
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user