Skip to content

Commit f3533a5

Browse files
fix: calcolo spazio occupato
1 parent d19ab0f commit f3533a5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/API/Services.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,11 @@ protected static function calcolaSpazioOccupato()
242242
// Prova a recuperare dalla cache
243243
$cache = Cache::where('name', 'Spazio utilizzato')->first();
244244
if ($cache && $cache->isValid()) {
245-
return (int) $cache->content;
245+
$osm_size = $cache->content;
246+
}
247+
if (!$osm_size) {
248+
$osm_size = FileSystem::folderSize(base_dir(), ['htaccess']);
246249
}
247-
$osm_size = FileSystem::folderSize(base_dir(), ['htaccess']);
248250

249251
return $osm_size;
250252
} catch (\Exception $e) {

0 commit comments

Comments
 (0)