Skip to content

Commit 6251f20

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: fix unix root dir issue sync validator translation files with master [HttpFoundation] fix not sending Content-Type header for 204 responses [ErrorHandler] silence warning when zend.assertions=-1 fix anchor [Console] Handle zero row count in appendRow() for Table fix links to releases page (formerly known as "roadmap") [Console] Don't load same-namespace alternatives on exact match found
2 parents 4176e7c + ea69c12 commit 6251f20

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: Finder.php

+4
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,10 @@ private function searchInDirectory(string $dir): \Iterator
782782
*/
783783
private function normalizeDir(string $dir): string
784784
{
785+
if ('/' === $dir) {
786+
return $dir;
787+
}
788+
785789
$dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
786790

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

Diff for: Iterator/RecursiveDirectoryIterator.php

+5-1
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)