From 9b580bd800729f6c71a6718ef3a0c06aa09b5dbc Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 1 Jun 2014 15:38:46 +0200 Subject: [PATCH] Do not realpath ./.., refs #2932 --- src/Composer/Util/Filesystem.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index b45135423..e81cacdb7 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -55,7 +55,13 @@ class Filesystem return array(); } - return array_map('realpath', $matches); + return array_map(function ($path) { + if (basename($path) === '.' || basename($path) === '..') { + return $path; + } + + return realpath($path); + }, $matches); } /**