Skip to content

Commit

Permalink
umu_runtime: fix detection for obsolete runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Oct 5, 2024
1 parent 45f1c11 commit 6dda3bf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions umu/umu_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,14 @@ def _update_umu(
resp: HTTPResponse
endpoint: str
token: str = f"?version={token_urlsafe(16)}"
is_obsolete: bool = _is_obsolete_umu(runtime_platform)

log.debug("Existing install detected")
log.debug("Sending request to '%s'...", client_session.host)

# When using an existing obsolete proton build, skip its updates but allow
# restoring it
if _is_obsolete_umu(runtime_platform):
if is_obsolete:
toolmanifest: Path = Path(os.environ["PROTONPATH"], "toolmanifest.vdf")
compat_tool: str = get_vdf_value(
toolmanifest,
Expand Down Expand Up @@ -421,7 +422,7 @@ def _update_umu(
)

# Skip SLR updates when not using the latest
if _is_obsolete_umu(runtime_platform):
if is_obsolete:
log.warning(
"%s is obsolete, skipping steamrt update",
Path(os.environ["PROTONPATH"]).name,
Expand Down Expand Up @@ -572,7 +573,9 @@ def _is_obsolete_umu(runtime_platform: tuple[str, str, str]) -> bool:
os.environ.get("PROTONPATH")
and os.environ.get("PROTONPATH") != "GE-Proton"
and get_vdf_value(
Path(os.environ["PROTONPATH"], "toolmanifest.vdf"),
Path(os.environ["PROTONPATH"], "toolmanifest.vdf").resolve(
strict=True
),
"require_tool_appid",
)
not in runtime_platform
Expand Down

0 comments on commit 6dda3bf

Please sign in to comment.