You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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://"
The text was updated successfully, but these errors were encountered:
This seems like a BC break for a ftp:// stream for example. One of our cont
9FE0
ractor encountered this problem too when upgrading a minor version.
Though I personnally recommand to use Flysystem or Gaufrette to connect to distant filesystems, this should be either fixed, or either mentionned in the documentation that it's no longer possible to do that.
Because right now, as pointed out by @jfmaeck, even the documentation says that a trailing slash must be added
…(DerDu)
This PR was squashed before being merged into the 3.4 branch (closes#28604).
Discussion
----------
[Finder] fixed root directory access for ftp/sftp wrapper
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27423
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This fixes a flaw introduced in 3.4.7 by #26763
In order to access the root folder with ftp wrapper, there MUST BE a slash present.
- Currently: from 3.4.7 on it just ```rtrim``` all seperators (```/```, ```\```) from directories
- Now: IF the directory is a (s)ftp:// wrapper (```#^s?ftp://#```) this fix just adds a slash (```/```) again
Commits
-------
9630a38 [Finder] fixed root directory access for ftp/sftp wrapper
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:
How to reproduce
Possible Solution
One might parse the given
$dir
string and trwat it differently if ti starts with "ftp://"The text was updated successfully, but these errors were encountered: