Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 72d62d2

Browse files
committed
do not duplicate directory separators
1 parent 1baafff commit 72d62d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function current()
7272
$subPathname .= $this->getFilename();
7373
$basePath = $this->rootPath;
7474

75-
if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator)) {
75+
if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator) && !str_ends_with($basePath, '/')) {
7676
$basePath .= $this->directorySeparator;
7777
}
7878

0 commit comments

Comments
 (0)