Skip to content

Commit ea69c12

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: fix unix root dir issue sync validator translation files with master fix anchor fix links to releases page (formerly known as "roadmap") [Console] Don't load same-namespace alternatives on exact match found
2 parents d026b07 + 5ec813c commit ea69c12

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Finder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,10 @@ private function searchInDirectory(string $dir): \Iterator
797797
*/
798798
private function normalizeDir(string $dir): string
799799
{
800+
if ('/' === $dir) {
801+
return $dir;
802+
}
803+
800804
$dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
801805

802806
if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) {

Iterator/RecursiveDirectoryIterator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ public function current()
7070
}
7171
$subPathname .= $this->getFilename();
7272

73-
return new SplFileInfo($this->rootPath.$this->directorySeparator.$subPathname, $this->subPath, $subPathname);
73+
if ('/' !== $basePath = $this->rootPath) {
74+
$basePath .= $this->directorySeparator;
75+
}
76+
77+
return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname);
7478
}
7579

7680
/**

0 commit comments

Comments
 (0)