diff --git a/install.php b/install.php index 632d97a87..2ca47b849 100644 --- a/install.php +++ b/install.php @@ -40,7 +40,7 @@ function out(string $str, string $type = ''): void 'warning' => "\033[33m$str \033[0m\n", 'info' => "\033[36m$str \033[0m\n", 'debug' => "\033[90m$str \033[0m\n", - default => $str, + default => "$str\n", }; } @@ -106,13 +106,13 @@ function chmod_r(string $dir, int $dirPermissions, int $filePermissions): void continue; } - $fullPath = $dir . '/' . $file; + $fullPath = realpath($dir . '/' . $file); if (is_dir($fullPath)) { - out('- Directory:' . $fullPath); + out("- Directory: $fullPath"); chmod($fullPath, $dirPermissions); chmod_r($fullPath, $dirPermissions, $filePermissions); } elseif (is_file($fullPath)) { - out('- File:' . $fullPath); + out("- File: $fullPath"); chmod($fullPath, $filePermissions); } else { out("- Cannot find target path: $fullPath", 'error');