profiles: back up a profile's saves before each run (upstream 8db940b) #42

Manually merged
github merged 1 commit from github-bot/gh-42 into main 2026-12-05 18:19:53 +00:00 AGit
Owner

@⁠Kal0s-design on GitHub · 2026-12-05 16:57 UTC · original
Kal0s-design:port/save-backups → main · +195 −0 · 2 files · 1 commits · merged 2026-12-05 18:17 UTC

This brings over upstream 8db940b by SovietBearz0r unchanged, with the authorship kept.

Before each run, the saves the last session left are copied to saves-backup/// under the title's data folder, and the newest ten are kept. On a retail save that's 9 files and about 320 KB per run. Custom profiles back up under their own folder, and a profile with no saves makes no copy. VICTORY_SAVE_BACKUPS=0 turns it off. With people moving between builds and forks as often as they do here, a broken run eating a save seems worth guarding against.

It applies cleanly on main, the profiles tests it adds pass, and clippy reports nothing in profiles.rs.

AI-assisted: yes

🤖 Generated with Claude Code

**@⁠Kal0s-design** on GitHub · 2026-12-05 16:57 UTC · [original](https://github.com/VGLALALA/ReVictory-RDNA3/pull/42) `Kal0s-design:port/save-backups` → `main` · +195 −0 · 2 files · 1 commits · merged 2026-12-05 18:17 UTC This brings over upstream 8db940b by SovietBearz0r unchanged, with the authorship kept. Before each run, the saves the last session left are copied to saves-backup/<profile>/<stamp>/ under the title's data folder, and the newest ten are kept. On a retail save that's 9 files and about 320 KB per run. Custom profiles back up under their own folder, and a profile with no saves makes no copy. VICTORY_SAVE_BACKUPS=0 turns it off. With people moving between builds and forks as often as they do here, a broken run eating a save seems worth guarding against. It applies cleanly on main, the profiles tests it adds pass, and clippy reports nothing in profiles.rs. AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A launch is the only moment the layer knows a session is about to start,
so the saves the last session left are copied to
`<title>/saves-backup/<profile>/<stamp>/` before the title runs, and the
newest ten are kept. On the retail save that is 9 files, 320 KB, a run;
`VICTORY_SAVE_BACKUPS=0` turns it off.

Custom profiles back up under their own folder, so one profile's saves
never overwrite another's backups. A profile with no saves yet makes no
copy: there is nothing to lose.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 16:58:28 +00:00
github manually merged commit c89f027d9c into main 2026-12-05 18:19:53 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.