mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 13:32:57 +00:00
@@ -83,6 +83,9 @@ def get_dir_size(path: str) -> int:
|
||||
totalbytes = 0
|
||||
for root, dirs, files in os.walk(path):
|
||||
for name in files:
|
||||
totalbytes += os.path.getsize(os.path.join(root, name))
|
||||
try:
|
||||
totalbytes += os.path.getsize(os.path.join(root, name))
|
||||
except FileNotFoundError as e:
|
||||
pass # file could be concurrently removed
|
||||
|
||||
return totalbytes
|
||||
|
||||
Reference in New Issue
Block a user