From 478c8da422e992f19de18076d93859cd0cf94741 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 21 Aug 2023 15:28:55 -0500 Subject: [PATCH] fix: don't calc size of broken links --- src/viv/viv.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/viv/viv.py b/src/viv/viv.py index 086e422..6ad3b50 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -52,7 +52,7 @@ from typing import ( Union, ) -__version__ = "23.8b2-5-g10e668b-dev" +__version__ = "23.8b2-6-gdafa099-dev" class Spinner: @@ -994,7 +994,9 @@ class ViVenv: return len([f for f in self.meta.files if Path(f).is_file()]) == 0 def get_size(self) -> None: - size = float(sum(p.stat().st_size for p in Path(self.path).rglob("*"))) + size = float( + sum(p.stat().st_size for p in Path(self.path).rglob("*") if p.is_file()) + ) for unit in ("B", "K", "M", "G", "T"): if size < 1024: break