mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Update install.php
This commit is contained in:
parent
1023a96cd0
commit
4f53eefbe4
1 changed files with 4 additions and 4 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue