Skip to content

Uninstall: the core keeps everything else out while a game's folder goes (#507) - #573

Merged
elripalda merged 2 commits into
elripalda:mainfrom
Xarishark:fix/uninstall-backend-guard
Nov 25, 2026
Merged

elripalda merged 2 commits into
elripalda:mainfrom
Xarishark:fix/uninstall-backend-guard

Conversation

@Xarishark

Copy link
Copy Markdown
Collaborator

Follows up #544 (#507). The "once only, nothing else while uninstalling" rule lived only in the window (S.uninstalling). The core now keeps it too, so nothing reaches a folder while it's being deleted.

Core

  • App has an uninstalling set beside moving. uninstall marks the game first and refuses a second call ("It's being uninstalled right now."). A drop guard clears the mark on every way out: success, error or panic.
  • files_busy() (moving or uninstalling) replaces the moving-only checks in install/update, Play, Move, Free Up Space, the project merge and a project change (adopt). One game of several counts as busy while its recomp is being uninstalled.
  • Cloud saves: sync (check/pick), the after-session copy, Upload Now and Restore refuse an uninstalling game. Finishing open sessions and save sharing skip it.
  • get_state doesn't mark a half-deleted folder as missing while it's being uninstalled.

Window (desktop and Big Picture share it)

  • The automatic update check skips a game that's being uninstalled, and so does an update that was waiting its turn (updateGame).
  • The new message is translated in all 20 full language files. en-GB and fr-CA only hold their differences.

Tests

  • Rust: a second uninstall is refused while one runs; the mark is cleared after success and after a refusal; Play/install/move see the game as busy, including one game of several; a cloud sync is refused for an uninstalling game and its games.
  • Node: the update check and a held update leave an uninstalling game alone. Two existing harnesses got S.uninstalling.
  • Ran on windows-vm: cargo test: 1085 passed, 0 failed. node --test tests/*.test.cjs: 979 passed, 0 failed.

A second uninstall, cloud saves, installs, updates, moves, Play and a project change all leave a game alone while it's being uninstalled. Follows up elripalda#544 (elripalda#507).
@Xarishark Xarishark self-assigned this Nov 25, 2026
@Xarishark
Xarishark marked this pull request as ready for review November 25, 2026 12:20
@elripalda
elripalda merged commit f3a0955 into elripalda:main Nov 25, 2026
6 checks passed
elripalda added a commit that referenced this pull request Nov 25, 2026
#403 (an update check can't overwrite a newer choice) and #573 (an
update check leaves a game being uninstalled alone) both changed
checkUpdates and each was tested against main without the other. Once
both were in, each one's test context was missing what the other added
(S.uninstalling and parentId; stillChecked), so 9 tests failed on main.
The code is right; the two test setups now include both.

Co-authored-by: Ripalda <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants