8000 [Finder] removed trailing slashes lead to error when listing files in FTP root dir · Issue #27423 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Finder] removed trailing slashes lead to error when listing files in FTP root dir #27423
Closed
@jfmaeck

Description

@jfmaeck

Symfony version(s) affected: 4.0.11 (might as well be earlier versions)

Description
In Finder 4.0.8 the commit symfony/finder@45429ad was released which should remove duplicate slashes from path names.

However, this results in an error when used to find files in an FTP root dir.
The documentation (https://symfony.com/doc/current/components/finder.html:) by the way explicitly states that the slash is required in this case:

// always add a trailing slash when looking for in the FTP root dir
$finder->in('ftp://example.com/');

How to reproduce

        $finder = new Finder();
        $files = $finder->files()->in('ftp://speedtest.tele2.net/');
        foreach ($files as $file) {
            var_dump($file);
        }

Possible Solution
One might parse the given $dirstring and trwat it differently if ti starts with "ftp://"

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

      0