瀏覽代碼

Merge branch '1.2'

Jordi Boggiano 8 年之前
父節點
當前提交
3030dab90e
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/Composer/Downloader/VcsDownloader.php

+ 6 - 0
src/Composer/Downloader/VcsDownloader.php

@@ -67,6 +67,12 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
         while ($url = array_shift($urls)) {
             try {
                 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);
                 }
                 $this->doDownload($package, $path, $url);