Detect broken symlinks when checking for a package's presence, fixes #6708
parent
a76a1c9fc2
commit
e3527ea37f
|
@ -90,7 +90,19 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface
|
|||
return true;
|
||||
}
|
||||
|
||||
return (Platform::isWindows() && $this->filesystem->isJunction($installPath)) || is_link($installPath);
|
||||
if (Platform::isWindows() && $this->filesystem->isJunction($installPath)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (is_link($installPath)) {
|
||||
if (realpath($installPath) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue