improve install createSymbolicLinks()

This commit is contained in:
xiaomlove
2023-09-29 13:54:27 +08:00
parent 95782fffe2
commit a4e0bc6709
2 changed files with 7 additions and 3 deletions

View File

@@ -596,7 +596,11 @@ class Install
{
foreach ($symbolicLinks as $path) {
$linkName = ROOT_PATH . 'public/' . basename($path);
if (is_link($linkName)) {
if (is_link($linkName) || is_file($linkName)) {
$delResult = unlink($linkName);
$this->doLog("path: $linkName already exits, try to delete it, delResult: " . var_export($delResult, true));
}
if (is_dir($linkName)) {
$this->doLog("path: $linkName already exits, skip create symbolic link $linkName -> $path");
continue;
}