From 98ba6d8bf47ff95f5bb616e23e623bd146cc85c4 Mon Sep 17 00:00:00 2001 From: Mark Ingman Date: Thu, 3 Nov 2016 17:37:14 +0000 Subject: [PATCH] Fixing empty VCS URL for file:/// paths with spaces realpath() returns FALSE for fFile paths with URL encoding like %20 for spaces. --- src/Composer/Downloader/VcsDownloader.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Composer/Downloader/VcsDownloader.php b/src/Composer/Downloader/VcsDownloader.php index 8487fee25..2918d2366 100644 --- a/src/Composer/Downloader/VcsDownloader.php +++ b/src/Composer/Downloader/VcsDownloader.php @@ -73,6 +73,8 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa if (0 === strpos($url, $needle)) { $url = substr($url, strlen($needle)); } + // realpath() will also not understand %20 etc + $url = rawurldecode($url); $url = realpath($url); } $this->doDownload($package, $path, $url);