Preserve pending saves when a replacement import fails #594

Open
github-bot wants to merge 1 commit from github-bot/gh-594 into main AGit
Owner

@⁠cnuonr on GitHub · 2026-11-28 01:38 UTC · original
cnuonr:fix/preserve-pending-save-import → main · +83 −15 · 2 files · 1 commits · open

What changed

  • Prepare the replacement in a temporary directory alongside the queued save. An extraction or copy failure leaves the queued save available for the next launch. If promotion fails after moving the previous import, restore it or retain it and report its location.
  • Reject a regular ZIP entry in place of a save root. Previously an archive containing only a file named saves reported success even though startup expects a directory.

Verification

  • Two generated ZIP cases reproduced the failures on main. The partial-extraction case also checks that a subsequent valid replacement is applied and stale files from the previous queue are absent.
  • cargo test --locked -p victory-gpu --lib save_share::tests passed all 7 tests on Windows.
  • Verified that the patch applies on top of #584. The tests use generated data.
**@⁠cnuonr** on GitHub · 2026-11-28 01:38 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/594) `cnuonr:fix/preserve-pending-save-import` → `main` · +83 −15 · 2 files · 1 commits · open ## What changed - Prepare the replacement in a temporary directory alongside the queued save. An extraction or copy failure leaves the queued save available for the next launch. If promotion fails after moving the previous import, restore it or retain it and report its location. - Reject a regular ZIP entry in place of a save root. Previously an archive containing only a file named `saves` reported success even though startup expects a directory. ## Verification - Two generated ZIP cases reproduced the failures on `main`. The partial-extraction case also checks that a subsequent valid replacement is applied and stale files from the previous queue are absent. - `cargo test --locked -p victory-gpu --lib save_share::tests` passed all 7 tests on Windows. - Verified that the patch applies on top of #584. The tests use generated data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:41:21 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/594/head:github-bot/gh-594'
git switch 'github-bot/gh-594'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-594'
git switch 'github-bot/gh-594'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-594'
git switch 'github-bot/gh-594'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-594'
git switch 'main'
git merge --squash 'github-bot/gh-594'
git switch 'main'
git merge --ff-only 'github-bot/gh-594'
git switch 'main'
git merge 'github-bot/gh-594'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.