Explorar o código

Fix for UNC Windows paths

Made isAbsolutePath recognize Windows UNC-style absolute paths starting with \\
Novicaine %!s(int64=6) %!d(string=hai) anos
pai
achega
486b25fd30
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Util/Filesystem.php

+ 1 - 1
src/Composer/Util/Filesystem.php

@@ -440,7 +440,7 @@ class Filesystem
      */
     public function isAbsolutePath($path)
     {
-        return substr($path, 0, 1) === '/' || substr($path, 1, 1) === ':';
+        return substr($path, 0, 1) === '/' || substr($path, 1, 1) === ':' || substr($path,0,2) === '\\';
     }
 
     /**