فهرست منبع

Fixing empty VCS URL for file:/// paths with spaces

realpath() returns FALSE for fFile paths with URL encoding like %20 for
spaces.
Mark Ingman 8 سال پیش
والد
کامیت
98ba6d8bf4
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/Composer/Downloader/VcsDownloader.php

+ 2 - 0
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);