Skip to content

The launcher stops guessing where a game saves - #304

Merged
elripalda merged 7 commits into
elripalda:mainfrom
Xarishark:feat/known-save-folders-only
Nov 18, 2026
Merged

elripalda merged 7 commits into
elripalda:mainfrom
Xarishark:feat/known-save-folders-only

Conversation

@Xarishark

Copy link
Copy Markdown
Collaborator

What

When the launcher doesn't know where a game saves, it says so and lets the player pick the folder,
instead of guessing. Backups and save copies stay inside the player's own folders.

  1. Only known save folders. A game's save folders are the player's, else its developer's
    (saves in recomplauncher.json), else the catalog's. The two guesses after those are gone: folders
    the launcher saw the game write to while it ran (found_saves, and the watcher that filled it),
    and the whole game folder ({install}). When nobody has said, the Saves tab says "The launcher
    doesn't know where this game saves" with Pick a Folder, on the desktop and in Big Picture.
    Until then nothing of it is backed up or synced: Back up now and Sync Now say why, and the check
    before Play leaves the cloud alone instead of putting a copy beside saves it can't see.
    saves_overview and saves_status give known: false for such a game.
  2. The backup before an update copies only save folders. It used to zip every small file in the
    game's folder that the release didn't ship. Now it copies the files from the game's known save
    folders (its own and its games' with saves of their own) that sit inside its folder. An update only
    replaces release files, so saves elsewhere are untouched by it.
  3. Save copies live beside each game. Without a folder the player picked, copies go to
    <library>/.backups/<game>/saves, beside the update backups, instead of <app dir>/saves/<id>.
    The cloud upload is the copy off the drive. A chosen folder still wins; copies made beside a game
    while it was unreachable go to it when it's back. Copies already in <app dir>/saves/<id> move once
    (at start and when the Saves page opens), each checked by checksum before its original goes. This
    PC's notes (state.json) stay in the app folder. A developer's own build keeps its copies in the
    app folder.

Why

Upcoming changes move build caches and work folders into each game's folder. The guesses (whole game
folder, any small non-release file) would back those up as saves: gigabytes of the wrong files, and
wrong files put back on restore.

Tests

  • cargo test: Linux (Bazzite) 727 passed; Windows 11 688 passed. New tests: nothing known means no save places, catalog/developer order, update backup keeps only saves inside the game folder, copies beside the game, one-time move from the app folder, a game with saves of its own, move to the player's folder.
  • node --test: 358 passed on Linux (incl. the new saves-unknown test); on Windows 11 all passed before the last commit (a UI-only fix).
  • The real app (built from this branch on Linux, driven with tauri-driver): for a game with no known save folder, the Saves tab leads with "The launcher doesn't know where this game saves" and Pick a Folder on the desktop and in Big Picture (focused first there); Back Up Now and Open the Game's Save Folder only show once a folder is known. A game with a picked folder shows as before.
  • Every new text translated in all languages. Not run: macOS.

Patch notes (players)

  • When the launcher doesn't know where a game saves, it says so and you pick the folder, instead of
    it guessing. Backups before an update keep only the game's saves, and save copies stay beside each
    game in your library.

For the website (SDK guide)

  • The saves section should say the launcher no longer watches what a game writes when saves is
    missing: without saves (or a catalog entry), players see that the launcher doesn't know where the
    game saves and pick the folder themselves, and nothing is backed up until they do. So listing
    saves matters more now.

Merging next to #303

This and #303 (all-or-nothing game updates) both change src-tauri/src/manage.rs. Whichever merges second needs main merged in first; I will do that.

A game's save folders are the player's, else its developer's
(recomplauncher.json), else the catalog's. The guesses after those (folders
the launcher saw it write to while it ran, then its whole folder) are gone,
with the watcher that noticed them: with build caches and work folders
inside each game's folder they backed up gigabytes of the wrong files.

When nobody has said, the Saves tab says the launcher doesn't know where
the game saves and offers Pick a Folder, on the desktop and in Big Picture.
Nothing is backed up or synced for it until then: Back up now and Sync Now
say so, and the check before Play leaves the cloud alone rather than putting
a copy beside saves it can't see. saves_overview and saves_status tell the
window with "known".
The saves section still said the launcher watches what a game writes when its recomplauncher.json doesn't say. Now it says the launcher doesn't guess, and asks the player.
It zipped every small file in the game's folder that the release didn't
ship (DATA_DIRS and size limits decided), which with build caches and work
folders in each game's folder is the wrong files. An update only replaces
the release's files, so it now copies the save files from the game's known
save folders (its own and those of its games with their own saves) that sit
inside the game's folder. Saves elsewhere stay as they are through an
update. Back up now says when the launcher doesn't know where the game
saves, and the Backups texts say what is kept.
Without a folder the player picked, a game's save copies went to
<app dir>/saves/<id>, outside the two folders the launcher keeps a game in
(its ROMs and its library). They now go to <library>/.backups/<game>/saves,
beside the backups made before its updates; a game with saves of its own in
a recomp gets a folder of its own inside. The cloud upload is the copy off
the drive. A chosen folder still wins, and copies made beside a game while
it was away go to it when it's back. A developer's own build keeps its
copies in the launcher's folder.

Copies already in <app dir>/saves/<id> move once at start (and when the
Saves page opens), each checked by checksum before its original goes, with
move_copies now taking pairs of folders. This PC's notes (state.json) stay
in the launcher's folder. Changing a game's project moves its copies after
the library is saved. The Saves page shows the library's .backups folder
when no folder is picked.
…'s own words

French says lanceur and vous, Spanish lanzador, Turkish the formal form and Ukrainian the informal one, as the rest of each language file does, in the texts about unknown save folders and the backup before an update.
…ill found

Uploads looked for a game's copies through its installed entry, so a queued copy of a game removed since failed with "It isn't installed." It's looked for where it was kept before (the player's folder, or the launcher's) instead. Moving copies also skips an empty id, which would name the folder that holds every game's copies.
The Saves tab said why nothing is backed up twice, kept Back up now as the main button, and offered to open a save folder it doesn't know. Now, on the desktop and in Big Picture, Pick a Folder comes first (the main button, and the first focused item), says why once, and Back up now, Sync Now and Open the Game's Save Folder wait until a folder is known. On This PC says No backups yet, and Big Picture only says a copy is kept after every session when it knows where the game saves.
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