소스 검색

Merge pull request #4426 from sroze/shortest-relative-path

Use shortest relative paths for symlinks with `path` repository
Jordi Boggiano 9 년 전
부모
커밋
b4bd5774dc
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/Composer/Downloader/PathDownloader.php

+ 2 - 1
src/Composer/Downloader/PathDownloader.php

@@ -48,7 +48,8 @@ class PathDownloader extends FileDownloader
         }
 
         try {
-            $fileSystem->symlink($realUrl, $path);
+            $shortestPath = $this->filesystem->findShortestPath($path, $realUrl);
+            $fileSystem->symlink($shortestPath, $path);
             $this->io->writeError(sprintf('    Symlinked from %s', $url));
         } catch (IOException $e) {
             $fileSystem->mirror($realUrl, $path);