From 6401b6aa461734cbfe11abb0488dcd2515f48151 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 2 Apr 2013 11:31:43 +0200 Subject: [PATCH] Fix handling of protocol paths like phar:// --- src/Composer/Util/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index 71c1caaed..110aeb847 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -313,7 +313,7 @@ class Filesystem $path = strtr($path, '\\', '/'); $prefix = ''; - if (preg_match('|^(([a-z]:)?/)|i', $path, $match)) { + if (preg_match('{^((?:[0-9a-z]+://)?(?:[a-z]:)?/)}i', $path, $match)) { $prefix = $match[1]; $path = substr($path, strlen($prefix)); }