From 486b25fd3015dc21df0524178d0ad279c91c8980 Mon Sep 17 00:00:00 2001 From: Novicaine Date: Fri, 15 Mar 2019 13:15:01 -0500 Subject: [PATCH 1/2] Fix for UNC Windows paths Made isAbsolutePath recognize Windows UNC-style absolute paths starting with \\ --- 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 1903f1c8d..d9e83280b 100644 --- a/src/Composer/Util/Filesystem.php +++ b/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) === '\\'; } /** From 8944627245b66948111a33f467b7c865115c559b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 19 Mar 2019 11:34:23 +0100 Subject: [PATCH 2/2] Fix syntax and backslash escaping --- 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 d9e83280b..c025a6b8c 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -440,7 +440,7 @@ class Filesystem */ public function isAbsolutePath($path) { - return substr($path, 0, 1) === '/' || substr($path, 1, 1) === ':' || substr($path,0,2) === '\\'; + return substr($path, 0, 1) === '/' || substr($path, 1, 1) === ':' || substr($path, 0, 2) === '\\\\'; } /**