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

main
Jordi Boggiano 4 years ago
parent 960413da3a
commit e6b45e853a
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

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

Loading…
Cancel
Save