1
0
Fork 0

cut out "file://" from VCS download() method

this issue was happening due to realpath() function
that cannot work with "file://" path.
For local repositories it is valid url but not valid for realpath()
pull/5688/merge
Ruslan Bekenev 2016-09-19 01:00:00 +03:00 committed by Jordi Boggiano
parent 1cf4ecd648
commit 8c1f889806
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
while ($url = array_shift($urls)) { while ($url = array_shift($urls)) {
try { try {
if (Filesystem::isLocalPath($url)) { if (Filesystem::isLocalPath($url)) {
# realpath() below will not understand
# url that starts with "file://"
$needle = 'file://';
if (0 === strpos($url, $needle)) {
$url = substr($url, strlen($needle));
}
$url = realpath($url); $url = realpath($url);
} }
$this->doDownload($package, $path, $url); $this->doDownload($package, $path, $url);