We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 24ea6ff + 58684bf commit aa67e5dCopy full SHA for aa67e5d
Finder.php
@@ -727,12 +727,20 @@ private function searchInDirectory(string $dir): \Iterator
727
/**
728
* Normalizes given directory names by removing trailing slashes.
729
*
730
+ * Excluding: (s)ftp:// wrapper
731
+ *
732
* @param string $dir
733
734
* @return string
735
*/
736
private function normalizeDir($dir)
737
{
- 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;
745
}
746
0 commit comments