Skip to content

Commit fababe1

Browse files
committed
bug symfony#57921 [Finder] do not duplicate directory separators (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Finder] do not duplicate directory separators | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#54352 | License | MIT Looking at the [test failures on AppVeyor](https://ci.appveyor.com/project/fabpot/symfony/builds/50345724#L975) it seems that symfony#57895 didn't (at least not fully) fix symfony#54352. Commits ------- 72d62d2 do not duplicate directory separators
2 parents 1baafff + 72d62d2 commit fababe1

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)