fix(saves): on Linux, Restore from a backup lists the older oot-save-backups folder too #190
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!190
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/LongshotLauncher:fix/linux-backup-folders"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Linux, Restore from a backup only read the launcher's own backups folder, so the backups players most likely want back were missing from it: the launcher's own from before #80, the ones Longshot's
scripts/longshot_saves.pymakes, and the game's own (Longshot#1428). They all sit in the older$XDG_DATA_HOME/oot-save-backups. Now the list reads both folders.Part of #188 (#188); Longshot's script part is a separate Longshot PR.
Builds on #182 (restore from a backup), now merged. Merge order: this one, then #184, #185.
What changes
$XDG_DATA_HOME/longshot/save-backup(Saves.BackupRoot, where the launcher's backups have gone since #80 and keep going) and$XDG_DATA_HOME/oot-save-backups(OldLinuxBackups).XDG_DATA_HOMEunset means~/.local/share, as before.save-backups/only.BackupRoot's comment no longer says the script's and the launcher's backups are in one place.docs/saves.mdgains a table of where each kind of backup is on each system.How
SaveEnvironment.BackupRoots(Linux:BackupRoot, thenOldLinuxBackups; Windows or portable:BackupRootalone) andOldLinuxBackups. Nothing that writes a backup changed: they all still useBackupRoot.SaveBackups.Listreads every root;BackupSave.Rootnames the folder a row is in; the backups page adds "in {0}" to a row's summary when there are two folders. One new text, written in the 12 full catalogs (needs a native speaker's check).tools/screenshots:saves-backups-linux, a backup in each folder.Testing
python -I tests/test_launcher_core.py: 1908 checks passed (new, inSaveBackupsChecks: the roots on Linux with and withoutXDG_DATA_HOME, on Windows, and for a portable launcher; backups in each Linux folder listed in order with their folder; the same name in both folders is two rows; neither Windows nor a portable launcher reads the Linux folders; a restore from the old folder works, backs Longshot's save up into the launcher's folder, and leaves the old folder exactly as it was; a gather's backup in the old folder restores too).python -I tests/test_release.py: 37 tests OK.dotnet build App -c Releaseandtools/screenshots: 0 warnings, 0 errors.SaveEnvironment, and the screenshot is drawn headless with a Linux environment).Screenshots, Before / After: in the first comment.
- A backup (or a gather's or delete's version folder) that holds several profiles listed each under the same label, and any of them restored into the game's profile. Now the game's profile (Saves.UserId) is listed alone when it is there; else each profile is listed with its id in the row, " (profile …)", as the import names one. - An export's backup says it restores into Longshot: its row ("…, to restore into Longshot") and its confirm's title ("Restore Lichii's old save into Longshot"). - The replaced text names only the files the source has (a backup with no account.sav or option.sav leaves Longshot's); the settings tick is hidden when the source has no option.sav, since it would change nothing. - A gather's "shared (set aside)" folder reads as the shared save. Back on a restore's confirm returns to the backups list. - docs/saves.md: one row a save the game would open; a whole save folder's import is undone only in part by a restore. - Checks: a whole-folder backup with a stray profile, a version folder with two profiles and one with the game's, an export's backup restored into Longshot, a backup with no account.sav or option.sav. The scene's backups gain an export. Assisted-by: Claude Code Co-Authored-By: Claude Opus 5.5 <[email protected]>Restore from a backup on Linux, from
tools/screenshots(headless, a Linux environment drawn on Windows, so the paths readD:\…where a Linux PC shows~/.local/share/…): one backup in the launcher'slongshot/save-backup, two in the olderoot-save-backups(an export's, and a gather's from a month ago). Before: #182 (a2617e6); After: this PR (bc55dac).bc55dac5c95802ebe95eRebased onto main (
12fd3af) now that #182 is merged: this PR is its own commit only. The files are identical to the previous head (bc55dac), so the earlier checks stand. Merge order: this, #184, #185.Closing: this change is already on main. #184 was stacked on this branch, so its squash merge (
00086cc) brought this PR's commit in with it. Checked against main: all 9 hunks in the 6 changed files are there, and the 12 catalog texts this PR added are there with the same translations. The conflict this PR shows is only in the language files, which #184 reshuffled afterwards. The launcher's part of #188 is done; Longshot's part is MagicBeanDev/Longshot#1473.Pull request closed