xgamesave: preserve older versions on manifest error #399
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/399"
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?
Imported from Marvisak/VIctory. Originally posted by lordon1a on 2026-11-24T02:56:11Z.
AI-assisted.
Problem
In
victory_hle::modules::xgamesave::current, older committed save directories (v1, etc.) were deleted withremove_dir_allbefore reading and validating the newest version's manifest. If the latest version's manifest was missing, unreadable, or corrupt, the previous good save version had already been destroyed.Fix
modules::xgamesave::tests::unreadable_latest_manifest_preserves_previous_versionverifying that both a missing manifest and an empty/corrupt manifest preservev1, and thatv1is pruned oncev2's manifest is valid.Verification
cargo xtask policy:151 files okcargo test -p victory-hle xgamesave:6 passed; 0 failedcargo clippy -p victory-hle --all-targets: 0 warnings inxgamesave.rsImported from Marvisak/VIctory. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T02:56:24Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:29:54Z.
Thanks @lordon1a for preserving the previous save version when the latest manifest cannot be read. I tested head
54f8cee58682bcdac13067542b07d1116fb8b66ewith:Result: 1 passed, 0 failed (86 filtered out). The test uses a synthetic save layout with an unreadable latest manifest and verifies the older version remains available. It does not exercise a title’s save workflow.
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T12:40:20Z.
Review: APPROVED
Tested
54f8ceeon Windows 11, RTX 5070, MSVC:cargo test -p victory-hle88 passed, includingunreadable_latest_manifest_preserves_previous_version.remove_dir_allof older versions after the newest manifest has been read and parsed means a missing, empty or corrupt latest manifest leavesv1in place. Before, the last good save was deleted before the new one was known to load.AI-assisted (Claude Code).
Pull request closed