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