trim trailng slash from symlink names

symlink names are not allowed to contain
a trailing slash, so trim it.
main
Christoph Herbst 8 years ago
parent 40c14709f7
commit cbfd83ba0e

@ -84,6 +84,7 @@ class PathDownloader extends FileDownloader
$absolutePath = getcwd() . DIRECTORY_SEPARATOR . $path; $absolutePath = getcwd() . DIRECTORY_SEPARATOR . $path;
} }
$shortestPath = $this->filesystem->findShortestPath($absolutePath, $realUrl); $shortestPath = $this->filesystem->findShortestPath($absolutePath, $realUrl);
$path = rtrim($path,"/");
$fileSystem->symlink($shortestPath, $path); $fileSystem->symlink($shortestPath, $path);
$this->io->writeError(sprintf(' Symlinked from %s', $url)); $this->io->writeError(sprintf(' Symlinked from %s', $url));
} }

Loading…
Cancel
Save