Skip to content

Commit aa67e5d

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: [Finder] fixed root directory access for ftp/sftp wrapper [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed
2 parents 24ea6ff + 58684bf commit aa67e5d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Finder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,12 +727,20 @@ private function searchInDirectory(string $dir): \Iterator
727727
/**
728728
* Normalizes given directory names by removing trailing slashes.
729729
*
730+
* Excluding: (s)ftp:// wrapper
731+
*
730732
* @param string $dir
731733
*
732734
* @return string
733735
*/
734736
private function normalizeDir($dir)
735737
{
736-
return rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
738+
$dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
739+
740+
if (preg_match('#^s?ftp://#', $dir)) {
741+
$dir .= '/';
742+
}
743+
744+
return $dir;
737745
}
738746
}

0 commit comments

Comments
 (0)