mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-08 00:42:19 +02:00
Check if posix_getpwuid/posix_getgrgid calls were successful (#1023)
This commit is contained in:
parent
2d1ca13c75
commit
04473eba27
|
@ -2049,6 +2049,12 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
|
|||
if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
|
||||
$owner = posix_getpwuid(fileowner($path . '/' . $f));
|
||||
$group = posix_getgrgid(filegroup($path . '/' . $f));
|
||||
if ($owner === false) {
|
||||
$owner = array('name' => '?');
|
||||
}
|
||||
if ($group === false) {
|
||||
$group = array('name' => '?');
|
||||
}
|
||||
} else {
|
||||
$owner = array('name' => '?');
|
||||
$group = array('name' => '?');
|
||||
|
@ -2102,6 +2108,12 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
|
|||
if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
|
||||
$owner = posix_getpwuid(fileowner($path . '/' . $f));
|
||||
$group = posix_getgrgid(filegroup($path . '/' . $f));
|
||||
if ($owner === false) {
|
||||
$owner = array('name' => '?');
|
||||
}
|
||||
if ($group === false) {
|
||||
$group = array('name' => '?');
|
||||
}
|
||||
} else {
|
||||
$owner = array('name' => '?');
|
||||
$group = array('name' => '?');
|
||||
|
|
Loading…
Reference in a new issue