mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 10:40:44 -06:00
fix: don't calc size of broken links
This commit is contained in:
parent
dafa099e4a
commit
478c8da422
1 changed files with 4 additions and 2 deletions
|
@ -52,7 +52,7 @@ from typing import (
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
|
||||||
__version__ = "23.8b2-5-g10e668b-dev"
|
__version__ = "23.8b2-6-gdafa099-dev"
|
||||||
|
|
||||||
|
|
||||||
class Spinner:
|
class Spinner:
|
||||||
|
@ -994,7 +994,9 @@ class ViVenv:
|
||||||
return len([f for f in self.meta.files if Path(f).is_file()]) == 0
|
return len([f for f in self.meta.files if Path(f).is_file()]) == 0
|
||||||
|
|
||||||
def get_size(self) -> None:
|
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"):
|
for unit in ("B", "K", "M", "G", "T"):
|
||||||
if size < 1024:
|
if size < 1024:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue