1
0
Fork 0

Add support for file:///c:/-style paths, refs #3338

pull/5243/head
Jordi Boggiano 2016-04-21 11:00:41 +01:00
parent 766c45c047
commit ff46816e79
1 changed files with 2 additions and 2 deletions

View File

@ -471,13 +471,13 @@ class Filesystem
*/
public static function isLocalPath($path)
{
return (bool) preg_match('{^(file://|/|[a-z]:[\\\\/]|\.\.[\\\\/]|[a-z0-9_.-]+[\\\\/])}i', $path);
return (bool) preg_match('{^(file://|/|/?[a-z]:[\\\\/]|\.\.[\\\\/]|[a-z0-9_.-]+[\\\\/])}i', $path);
}
public static function getPlatformPath($path)
{
if (Platform::isWindows()) {
$path = preg_replace('{^(?:file:///([a-z])/)}i', 'file://$1:/', $path);
$path = preg_replace('{^(?:file:///([a-z]):?/)}i', 'file://$1:/', $path);
}
return preg_replace('{^file://}i', '', $path);