From 8e81e54aae763dd4e371a2d621e29f31a80105af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:13:38 +0200 Subject: [PATCH] Update utils.inc.php --- core/php/utils.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/php/utils.inc.php b/core/php/utils.inc.php index c113fcf7d0..c7f930e1c6 100644 --- a/core/php/utils.inc.php +++ b/core/php/utils.inc.php @@ -859,7 +859,11 @@ function getDirectorySize($path) { $path = realpath($path); if($path!==false && $path!='' && file_exists($path) && !is_link($path)){ foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)) as $object){ - $bytestotal += $object->getSize(); + try { + $bytestotal += $object->getSize(); + } catch (\Throwable $th) { + + } } } return $bytestotal;