Skip to content

Commit

Permalink
ulwgl_dl_util: prefer joining paths
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Feb 17, 2024
1 parent 83a59dc commit 3a5b4b1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ulwgl_dl_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ def get_ulwgl_proton(env: Dict[str, str]) -> Union[Dict[str, str], None]:
except Timeout:
print("Offline.\nContinuing ...")

cache: Path = Path(Path().home().as_posix() + "/.cache/ULWGL")
steam_compat: Path = Path(
Path().home().as_posix() + "/.local/share/Steam/compatibilitytools.d"
)
cache: Path = Path.home().joinpath(".cache/ULWGL")
steam_compat: Path = Path.home().joinpath(".local/share/Steam/compatibilitytools.d")

cache.mkdir(exist_ok=True, parents=True)
steam_compat.mkdir(exist_ok=True, parents=True)
Expand Down Expand Up @@ -134,7 +132,7 @@ def _fetch_proton(
raise ValueError(err)
print(f"{proton}: SHA512 is OK")

_extract_dir(Path(f"{cache.as_posix()}/{proton}"), steam_compat)
_extract_dir(cache.joinpath(proton), steam_compat)
environ["PROTONPATH"] = steam_compat.joinpath(proton[: proton.find(".")]).as_posix()
env["PROTONPATH"] = environ["PROTONPATH"]

Expand Down

0 comments on commit 3a5b4b1

Please sign in to comment.