ulwgl_dl_util: fix bug when referencing old Proton from cache

- Fixes a logic error by terminating prematurely when referencing an old Proton version that has been saved in the cache
This commit is contained in:
R1kaB3rN 2024-02-17 17:32:58 -08:00
parent 9a425dd784
commit 88a47e3ea0
No known key found for this signature in database

View File

@ -204,11 +204,13 @@ def _get_from_cache(
if files and tarball == cache.joinpath(files[1][0]) and use_latest:
path = tarball
name = tarball.name
elif not use_latest:
break
if tarball != cache.joinpath(files[1][0]) and not use_latest:
path = tarball
name = tarball.name
print(f"{tarball.name} found in: {cache.as_posix()}")
break
break
print(f"{name} found in: {path}")
if path:
proton_dir: str = name[: name.find(".tar.gz")] # Proton dir