1
0
Fork 0

Fix case where PHP's symlink returns false without any error or warning.

pull/1781/head
qcho 2013-04-09 03:27:37 -03:00
parent 069109e0f0
commit d4fb403fd7
1 changed files with 3 additions and 1 deletions

View File

@ -217,7 +217,9 @@ class LibraryInstaller implements InstallerInterface
// when using it in smbfs mounted folder // when using it in smbfs mounted folder
$relativeBin = $this->filesystem->findShortestPath($link, $binPath); $relativeBin = $this->filesystem->findShortestPath($link, $binPath);
chdir(dirname($link)); chdir(dirname($link));
symlink($relativeBin, $link); if (false === symlink($relativeBin, $link)) {
throw new \ErrorException();
}
} catch (\ErrorException $e) { } catch (\ErrorException $e) {
file_put_contents($link, $this->generateUnixyProxyCode($binPath, $link)); file_put_contents($link, $this->generateUnixyProxyCode($binPath, $link));
} }