We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb0be79 commit 14bc74dCopy full SHA for 14bc74d
src/Symfony/Component/Filesystem/Path.php
@@ -368,7 +368,7 @@ public static function isAbsolute(string $path): bool
368
}
369
370
// Strip scheme
371
- if (false !== $schemeSeparatorPosition = strpos($path, '://')) {
+ if ((false !== $schemeSeparatorPosition = strpos($path, '://')) && !preg_match('#^[A-Z]://#', $path)) {
372
$path = substr($path, $schemeSeparatorPosition + 3);
373
374
src/Symfony/Component/Filesystem/Tests/PathTest.php
@@ -375,6 +375,8 @@ public static function provideIsAbsolutePathTests(): \Generator
375
376
yield ['C:/css/style.css', true];
377
yield ['D:/', true];
378
+ yield ['C:///windows', true];
379
+ yield ['C://test', true];
380
381
yield ['E:\\css\\style.css', true];
382
yield ['F:\\', true];
0 commit comments