fix: wait for a cancelled Battle.net job before removing it, and bound uninstall waits

A cancelled install now waits for its Agent job to end before the
uninstall runs, and removes the folder only once the Agent no longer
lists the game or the folder is empty. Uninstall gives up when Battle.net
or a game keeps the prefix busy for a minute, so the page falls back to
opening Battle.net. An uninstall only counts when the Agent reports the
game as not installed.
This commit is contained in:
maxjivi05 authored and MaxsTechReview committed 2026-10-26 09:01:02 -04:00
1 parent b887e8653d
commit c48297e0d1
4 files changed
+51 -17

No files matched your search

@@ -1248,7 +1248,7 @@ def agent_job(root, action, uid, product="", folder="", locale="enUS", country="
"version": game.get("local_version", "")}, sort_keys=True))
say("%s %s in %s" % (uid, "updated" if action == "update" else "installed", game.get("install_dir", windows)))
return 0
if reason is None and action == "uninstall" and game.get("installed") is not True:
if reason is None and action == "uninstall" and game.get("installed") is False:
emit("DONE", json.dumps({"uninstalled": uid}))
say("%s uninstalled" % uid)
return 0