Skip to content

Commit

Permalink
umu_runtime: get runtime directory after integrity check
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Oct 10, 2024
1 parent e8cddbb commit 2c738e1
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions umu/umu_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,30 +251,6 @@ def _update_umu(
log.debug("Existing install detected")
log.debug("Sending request to '%s'...", client_session.host)

# Find the runtime directory (e.g., sniper_platform_0.20240530.90143)
# Assume the directory begins with the alias
try:
runtime = max(
file for file in local.glob(f"{codename}*") if file.is_dir()
)
except ValueError:
log.debug("*_platform_* directory missing in '%s'", local)
log.warning("Runtime Platform not found")
log.console("Restoring Runtime Platform...")
_restore_umu(
json,
thread_pool,
lambda: len(
[file for file in local.glob(f"{codename}*") if file.is_dir()]
)
> 0,
client_session,
)
return

log.debug("Runtime: %s", runtime.name)
log.debug("Codename: %s", codename)

# Restore our runtime if our checksum file is missing
if not local.joinpath("umu.hashsum").is_file():
log.warning("Runtime Platform corrupt")
Expand Down Expand Up @@ -310,6 +286,13 @@ def _update_umu(
)
return

# Find the runtime directory (e.g., sniper_platform_0.20240530.90143)
# Assume the directory begins with the alias
runtime = max(file for file in local.glob(f"{codename}*") if file.is_dir())

log.debug("Runtime: %s", runtime.name)
log.debug("Codename: %s", codename)

# Update the runtime if necessary by comparing VERSIONS.txt to the remote
# repo.steampowered currently sits behind a Cloudflare proxy, which may
# respond with cf-cache-status: HIT in the header for subsequent requests
Expand Down

0 comments on commit 2c738e1

Please sign in to comment.