← All changes
|
vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
+5
-4
3.0.1
→
3.2.90
View file →
| @@ -7,12 +7,12 @@ | ||
| 7 | 7 | * |
| 8 | 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | -namespace WindPressPackages\Symfony\Component\Finder\Iterator; | |
| 11 | +namespace WindPressDeps\Symfony\Component\Finder\Iterator; | |
| 12 | 12 | |
| 13 | -use WindPressPackages\Symfony\Component\Finder\Exception\AccessDeniedException; | |
| 14 | -use WindPressPackages\Symfony\Component\Finder\SplFileInfo; | |
| 13 | +use WindPressDeps\Symfony\Component\Finder\Exception\AccessDeniedException; | |
| 14 | +use WindPressDeps\Symfony\Component\Finder\SplFileInfo; | |
| 15 | 15 | /** |
| 16 | 16 | * Extends the \RecursiveDirectoryIterator to support relative paths. |
| 17 | 17 | * |
| 18 | 18 | * @author Victor Berchet <victor@suumit.com> |
| @@ -61,9 +61,10 @@ | ||
| 61 | 61 | if ('' !== $subPathname) { |
| 62 | 62 | $subPathname .= $this->directorySeparator; |
| 63 | 63 | } |
| 64 | 64 | $subPathname .= $this->getFilename(); |
| 65 | - if ('/' !== $basePath = $this->rootPath) { | |
| 65 | + $basePath = $this->rootPath; | |
| 66 | + if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator) && !str_ends_with($basePath, '/')) { | |
| 66 | 67 | $basePath .= $this->directorySeparator; |
| 67 | 68 | } |
| 68 | 69 | return new SplFileInfo($basePath . $subPathname, $this->subPath, $subPathname); |
| 69 | 70 | } |