ulwgl_dl_util: fix bug when referring to cache for latest

- Add missing return statement

- Delete property access of name
This commit is contained in:
R1kaB3rN 2024-02-15 11:02:23 -08:00
parent d1c24b16e6
commit 9a116c6a0a
No known key found for this signature in database

View File

@ -44,16 +44,20 @@ def get_ulwgl_proton(env: Dict[str, str]) -> Union[Dict[str, str], None]:
files
and Path(Path().home().as_posix() + "/.cache/ULWGL" + files[1][0]).is_file()
):
proton: str = files[1][0]
print(f"{proton} found in: {cache.as_posix()}")
_extract_dir(
Path(Path().home().as_posix() + "/.cache/ULWGL").joinpath(files[1][0]),
steam_compat,
)
environ["PROTONPATH"] = steam_compat.joinpath(
proton.name[: proton.name.find(".")]
proton[: proton.find(".")]
).as_posix()
env["PROTONPATH"] = environ["PROTONPATH"]
return env
# Download the latest if GE-Proton is not in Steam compat
# If the digests mismatched, refer to the cache in the next block
if files: