Skip to content

[Finder] Unable to scan root in unix like systems. #35683

@xandros15

Description

@xandros15

Symfony version(s) affected: 5.0.4 and 4.4.4 and maybe others.

Description
When i use '/' or ['/'] as parametr in method Finder::in, got exception during iteration: Directory name must not be empty. In line 48 /vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php.

How to reproduce
(code should works of unix like systems)

use Symfony\Component\Finder\Finder;

$finder = new Finder();
$finder->in('/');
foreach($finder as $item){
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions