1
0
Fork 0

[Installer] Make bin symlinks relative, closes #620

pull/634/head
Igor Wiedler 2012-04-27 16:55:43 +02:00
parent 54f2e8fb45
commit aa4ececa2a
1 changed files with 6 additions and 2 deletions

View File

@ -168,14 +168,18 @@ class LibraryInstaller implements InstallerInterface
}
file_put_contents($link, $this->generateWindowsProxyCode($bin, $link));
} else {
$cwd = getcwd();
try {
// under linux symlinks are not always supported for example
// when using it in smbfs mounted folder
symlink($bin, $link);
$relativeBin = $this->filesystem->findShortestPath($link, $bin);
chdir(dirname($link));
symlink($relativeBin, $link);
} catch (\ErrorException $e) {
var_dump($e->getMessage());
file_put_contents($link, $this->generateUnixyProxyCode($bin, $link));
}
chdir($cwd);
}
chmod($link, 0777 & ~umask());
}