[Finder] fixed root directory access for ftp/sftp wrapper
This commit is contained in:
parent
2a605c2ed6
commit
9630a38d67
@ -732,12 +732,20 @@ class Finder implements \IteratorAggregate, \Countable
|
||||
/**
|
||||
* Normalizes given directory names by removing trailing slashes.
|
||||
*
|
||||
* Excluding: (s)ftp:// wrapper
|
||||
*
|
||||
* @param string $dir
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function normalizeDir($dir)
|
||||
{
|
||||
return rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
|
||||
$dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
|
||||
|
||||
if (preg_match('#^s?ftp://#', $dir)) {
|
||||
$dir .= '/';
|
||||
}
|
||||
|
||||
return $dir;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user