修复在用户未初始化保险箱时计算容量出错的bug

This commit is contained in:
Chenx221 2024-03-19 15:03:33 +08:00
parent 2baea47164
commit 043e70ab7d
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021

View File

@ -17,6 +17,9 @@ class FileSizeHelper
*/
public static function getDirectorySize(string $directory): int
{
if (!is_dir($directory)) {
return 0;
}
$size = 0;
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory));
foreach ($files as $file) {