server/info: report correct size when filesystem is missing files
Merges PR #279
This commit is contained in:
parent
4fe9c5f4ca
commit
d2a4e50669
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@ def _get_disk_usage() -> int:
|
|||
for dir_path, _, file_names in os.walk(config.config['data_dir']):
|
||||
for file_name in file_names:
|
||||
file_path = os.path.join(dir_path, file_name)
|
||||
total_size += os.path.getsize(file_path)
|
||||
try:
|
||||
total_size += os.path.getsize(file_path)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
_cache_time = now
|
||||
_cache_result = total_size
|
||||
return total_size
|
||||
|
|
Loading…
Reference in a new issue