1
0
Fork 0

Make sure to use an absolute path for symlinking in PathDownloader. Resolves #4451

pull/5095/head
Alain Schlesser 2016-03-23 12:19:41 +01:00
parent a8e9df55dc
commit 4e9885e9bc
1 changed files with 5 additions and 1 deletions

View File

@ -79,7 +79,11 @@ class PathDownloader extends FileDownloader
$this->filesystem->junction($realUrl, $path);
$this->io->writeError(sprintf(' Junctioned from %s', $url));
} else {
$shortestPath = $this->filesystem->findShortestPath($path, $realUrl);
$absolutePath = $path;
if ( ! $this->filesystem->isAbsolutePath($absolutePath)) {
$absolutePath = getcwd() . DIRECTORY_SEPARATOR . $path;
}
$shortestPath = $this->filesystem->findShortestPath($absolutePath, $realUrl);
$fileSystem->symlink($shortestPath, $path);
$this->io->writeError(sprintf(' Symlinked from %s', $url));
}