Skip to content

[Finder] removed trailing slashes lead to error when listing files in FTP root dir #27423

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy