From 88a47e3ea084f38e0fb9979bf0a7c6ae9611ee2d Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Sat, 17 Feb 2024 17:32:58 -0800 Subject: [PATCH] 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 --- ulwgl_dl_util.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ulwgl_dl_util.py b/ulwgl_dl_util.py index 99d876e..f2a864c 100644 --- a/ulwgl_dl_util.py +++ b/ulwgl_dl_util.py @@ -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