Browse Source

Fix handling of protocol paths like phar://

Jordi Boggiano 12 years ago
parent
commit
6401b6aa46
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Composer/Util/Filesystem.php

+ 1 - 1
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));
         }