From fbe4692f848f3101ccba6d6aa00996b71d1edef8 Mon Sep 17 00:00:00 2001 From: tretrauit Date: Sat, 19 Feb 2022 19:05:19 +0700 Subject: [PATCH] Await AsyncPath.exists() Bump to 1.2.8-1 --- setup.py | 2 +- worthless/installer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9bf1c8d..ea2bea9 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text() setup( name='worthless', - version='1.2.8', + version='1.2.8-1', packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'], url='https://git.froggi.es/tretrauit/worthless-launcher', license='MIT License', diff --git a/worthless/installer.py b/worthless/installer.py index fa86440..1493e75 100644 --- a/worthless/installer.py +++ b/worthless/installer.py @@ -104,7 +104,7 @@ class Installer: file_path = AsyncPath(self.temp_path).joinpath(file_name) if overwrite: await file_path.unlink(missing_ok=True) - if file_path.exists(): + if await file_path.exists(): cur_len = len(await file_path.read_bytes()) params |= { "Range": f"bytes={cur_len}-{file_len if file_len else ''}"