Linux: save backups are split between two folders, and the launcher lists only one #188

Open
opened 2026-11-17 21:49:07 +00:00 by dyst · 3 comments
Member

On Linux and the Steam Deck, save backups end up in two different folders, and the launcher only knows one of them. A player who needs a backup back (the restore list coming in #182, or by hand following docs/saves.md) doesn't see the ones in the other folder, and may think they're gone.

Where each one writes on Linux

Writer Folder
The launcher since #80 $XDG_DATA_HOME/longshot/save-backup/ (default ~/.local/share/longshot/save-backup/)
The launcher before #80 $XDG_DATA_HOME/oot-save-backups/
Longshot's scripts/longshot_saves.py (its backup_root()) $XDG_DATA_HOME/oot-save-backups/
Longshot's game, in MagicBeanDev/Longshot#1428 (WIP) $XDG_DATA_HOME/oot-save-backups/

Windows has no such split: every writer uses %LOCALAPPDATA%\Longshot\oot-save-backups. A portable launcher keeps its own LongshotLauncher-data/save-backups/.

The launcher reads only Saves.BackupRoot, which on Linux is longshot/save-backup (Core/Saves.cs). Its comment says the script's and the launcher's backups are in one place, which is only true on Windows. Found in HumanBean's review of #182: #182 (comment)

What fixes it

  1. The launcher lists backups from both Linux folders (longshot/save-backup and the older oot-save-backups), so backups made by the script, by a launcher from before #80, or by the game are found and can be restored. New launcher backups keep going to longshot/save-backup. docs/saves.md says where each kind is.
  2. Longshot writes to the same folder as the launcher on Linux: scripts/longshot_saves.py's default backup root becomes $XDG_DATA_HOME/longshot/save-backup, and #1428's game backups use the same folder, so there is one place again. Older backups stay where they are, and the launcher still lists them through (1).

Nothing is moved or deleted: old backups stay where they are.

On Linux and the Steam Deck, save backups end up in two different folders, and the launcher only knows one of them. A player who needs a backup back (the restore list coming in #182, or by hand following docs/saves.md) doesn't see the ones in the other folder, and may think they're gone. ## Where each one writes on Linux | Writer | Folder | |---|---| | The launcher since #80 | `$XDG_DATA_HOME/longshot/save-backup/` (default `~/.local/share/longshot/save-backup/`) | | The launcher before #80 | `$XDG_DATA_HOME/oot-save-backups/` | | Longshot's `scripts/longshot_saves.py` (its `backup_root()`) | `$XDG_DATA_HOME/oot-save-backups/` | | Longshot's game, in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1428 (WIP) | `$XDG_DATA_HOME/oot-save-backups/` | Windows has no such split: every writer uses `%LOCALAPPDATA%\Longshot\oot-save-backups`. A portable launcher keeps its own `LongshotLauncher-data/save-backups/`. The launcher reads only `Saves.BackupRoot`, which on Linux is `longshot/save-backup` (`Core/Saves.cs`). Its comment says the script's and the launcher's backups are in one place, which is only true on Windows. Found in HumanBean's review of #182: https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/182#issuecomment-45174 ## What fixes it 1. **The launcher lists backups from both Linux folders** (`longshot/save-backup` and the older `oot-save-backups`), so backups made by the script, by a launcher from before #80, or by the game are found and can be restored. New launcher backups keep going to `longshot/save-backup`. docs/saves.md says where each kind is. 2. **Longshot writes to the same folder as the launcher on Linux:** `scripts/longshot_saves.py`'s default backup root becomes `$XDG_DATA_HOME/longshot/save-backup`, and #1428's game backups use the same folder, so there is one place again. Older backups stay where they are, and the launcher still lists them through (1). Nothing is moved or deleted: old backups stay where they are.
Collaborator

Possibly related, for context:

  • PR #80 fix(saves): Linux save backups in ~/.local/share/longshot/save-backup, beside the saves — Merged change introduced the Linux backup-folder split; this issue asks for compatibility across both folders.
  • PR #182 feat(saves): restore from a backup: every save the copies backed up, newest first, put back after a confirmation — Open restore feature affected: restore list may miss backups in the other folder.
Possibly related, for context: - PR #80 fix(saves): Linux save backups in ~/.local/share/longshot/save-backup, beside the saves — Merged change introduced the Linux backup-folder split; this issue asks for compatibility across both folders. - PR #182 feat(saves): restore from a backup: every save the copies backed up, newest first, put back after a confirmation — Open restore feature affected: restore list may miss backups in the other folder.
Author
Member

Longshot's side: MagicBeanDev/Longshot#1473 (ready) makes the save script back up into $XDG_DATA_HOME/longshot/save-backup on Linux, the launcher's folder; older backups stay in oot-save-backups. Asked on MagicBeanDev/Longshot#1428 for the game's backups to use the same folder. Still to do here: the launcher listing the old oot-save-backups folder too.

Longshot's side: https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1473 (ready) makes the save script back up into `$XDG_DATA_HOME/longshot/save-backup` on Linux, the launcher's folder; older backups stay in `oot-save-backups`. Asked on https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1428 for the game's backups to use the same folder. Still to do here: the launcher listing the old `oot-save-backups` folder too.
Author
Member

The launcher's part is on main: listing the older Linux folder (oot-save-backups) beside longshot/save-backup came in with #184's merge (00086cc), as #190 was stacked under it (#190 closed as included). Still open: Longshot's script part, MagicBeanDev/Longshot#1473.

The launcher's part is on main: listing the older Linux folder (oot-save-backups) beside longshot/save-backup came in with #184's merge (00086cc), as #190 was stacked under it (#190 closed as included). Still open: Longshot's script part, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1473.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher#188
No description provided.