Await AsyncPath.exists()

Bump to 1.2.8-1
This commit is contained in:
tretrauit 2022-02-19 19:05:19 +07:00
parent 92ae7b71cf
commit fbe4692f84
No known key found for this signature in database
GPG Key ID: 862760FF1903319E
2 changed files with 2 additions and 2 deletions

View File

@ -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',

View File

@ -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 ''}"