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 files
and Path(Path().home().as_posix() + "/.cache/ULWGL" + files[1][0]).is_file() 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( _extract_dir(
Path(Path().home().as_posix() + "/.cache/ULWGL").joinpath(files[1][0]), Path(Path().home().as_posix() + "/.cache/ULWGL").joinpath(files[1][0]),
steam_compat, steam_compat,
) )
environ["PROTONPATH"] = steam_compat.joinpath( environ["PROTONPATH"] = steam_compat.joinpath(
proton.name[: proton.name.find(".")] proton[: proton.find(".")]
).as_posix() ).as_posix()
env["PROTONPATH"] = environ["PROTONPATH"] env["PROTONPATH"] = environ["PROTONPATH"]
return env
# Download the latest if GE-Proton is not in Steam compat # Download the latest if GE-Proton is not in Steam compat
# If the digests mismatched, refer to the cache in the next block # If the digests mismatched, refer to the cache in the next block
if files: if files: