Skip to content

Commit

Permalink
fix du calculation for plain files
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 11, 2024
1 parent f12349f commit bb42b03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packaging/MSWindows/BUILD.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def csv(values: Iterable) -> str:


def du(path: str) -> int:
if os.path.isfile(path):
return os.path.getsize(path)
return sum(os.path.getsize(f) for f in glob(f"{path}/**", recursive=True) if os.path.isfile(f))


Expand Down

0 comments on commit bb42b03

Please sign in to comment.