1
0
Fork 0

Fix status command handling of symlinks, and especially broken ones, fixes #9169

pull/9197/head
Jordi Boggiano 2020-09-07 13:54:14 +02:00
parent 960413da3a
commit e6b45e853a
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 6 additions and 6 deletions

View File

@ -102,18 +102,18 @@ class Comparer
if ($dh = opendir($dir)) {
while ($file = readdir($dh)) {
if ($file !== '.' && $file !== '..') {
if (is_dir($dir.'/'.$file)) {
if (is_link($dir.'/'.$file)) {
$array[$dir][$file] = readlink($dir.'/'.$file);
} elseif (is_dir($dir.'/'.$file)) {
if (!count($array)) {
$array[0] = 'Temp';
}
if (!$this->doTree($dir.'/'.$file, $array)) {
return false;
}
} else {
if (filesize($dir.'/'.$file)) {
set_time_limit(30);
$array[$dir][$file] = md5_file($dir.'/'.$file);
}
} elseif (is_file($dir.'/'.$file) && filesize($dir.'/'.$file)) {
set_time_limit(30);
$array[$dir][$file] = md5_file($dir.'/'.$file);
}
}
}