1
0
Fork 0

test before chdir

pull/9532/head
Michael Voříšek 2020-11-30 01:34:16 +01:00
parent e712130062
commit b4cb2f7321
1 changed files with 5 additions and 6 deletions

View File

@ -597,16 +597,15 @@ class Filesystem
*/
public function relativeSymlink($target, $link)
{
if (!function_exists('symlink')) {
return false;
}
$cwd = getcwd();
$relativePath = $this->findShortestPath($link, $target);
chdir(\dirname($link));
if (function_exists('symlink')) {
$result = @symlink($relativePath, $link);
} else {
$result = false;
}
chdir($cwd);