Skip to content

Commit fababe1

Browse files
committed
bug #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 #54352 | License | MIT Looking at the [test failures on AppVeyor](https://ci.appveyor.com/project/fabpot/symfony/builds/50345724#L975) it seems that #57895 didn't (at least not fully) fix #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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy