Fix handling of protocol paths like phar://
parent
59c4df5ba3
commit
6401b6aa46
|
@ -313,7 +313,7 @@ class Filesystem
|
||||||
$path = strtr($path, '\\', '/');
|
$path = strtr($path, '\\', '/');
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
|
|
||||||
if (preg_match('|^(([a-z]:)?/)|i', $path, $match)) {
|
if (preg_match('{^((?:[0-9a-z]+://)?(?:[a-z]:)?/)}i', $path, $match)) {
|
||||||
$prefix = $match[1];
|
$prefix = $match[1];
|
||||||
$path = substr($path, strlen($prefix));
|
$path = substr($path, strlen($prefix));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue