Explorar o código

Fix originUrl in FileDownloader, refs #423

Jordi Boggiano %!s(int64=12) %!d(string=hai) anos
pai
achega
fa3d6c7ce2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Downloader/FileDownloader.php

+ 1 - 1
src/Composer/Downloader/FileDownloader.php

@@ -70,7 +70,7 @@ class FileDownloader implements DownloaderInterface
         $processUrl = $this->processUrl($package, $url);
 
         try {
-            $this->rfs->copy($package->getSourceUrl(), $processUrl, $fileName);
+            $this->rfs->copy(parse_url($processUrl, PHP_URL_HOST), $processUrl, $fileName);
 
             if (!file_exists($fileName)) {
                 throw new \UnexpectedValueException($url.' could not be saved to '.$fileName.', make sure the'