8000 do not duplicate directory separators · symfony/symfony@a04eae4 · GitHub
[go: up one dir, main page]

Skip to content

Commit a04eae4

Browse files
committed
do not duplicate directory separators
1 parent b0fe332 commit a04eae4
8000

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ public function current()
7070
$subPathname .= $this->directorySeparator;
7171
}
7272
$subPathname .= $this->getFilename();
73+
$basePath = $this->rootPath;
7374

74-
if ('/' !== $basePath = $this->rootPath) {
75+
if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator)) {
7576
$basePath .= $this->directorySeparator;
7677
}
7778

0 commit comments

Comments
 (0)
0