XGameSave: a folder named like a version, such as v01, does not remov… #1006
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1006"
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 NATON4 on 2026-11-24T14:55:14Z.
…e the save
Recovery read every folder
v<digits>as a committed version, so av01,v001orv+1beside the committedv1also counted as version 1. One of the two was then "older" and removed by its rebuilt name,v1: the committed save itself. Reading the newest version's manifest then failed with NotFound, which reads as no save at all.A version's folder is now only
v<N>exactly ascommitnames it (no sign, no leading zeros). Other names are not versions: recovery neither counts nor removes them.The new test commits a save, adds
v01,v001andv+1folders, and checks that the save reads back, the strays are left alone and the next update goes on tov2.Closes #870.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T15:02:23Z.
Review: APPROVED
Tested merged cleanly onto
main(ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):cargo test -p victory-hle: 95 passed, 0 failed (plusno_dll_planting: 1 passed)cargo clippy -p victory-hle --all-targets: 0 warningscargo xtask policy: okClean fix ensuring non-canonical version-like directories (such as
v01) cannot trigger deletion of a committed save during recovery. Approving.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T15:03:28Z.
Verified the canonical-name fix together with the older-save preservation follow-up on Wine 11.22. All nine XGameSave tests passed using temporary saves. Your test exercised a normal update from v1 to v2 with the stray directories still present.
The follow-up covers a separate recovery decision in
current(): parse the newest manifest before pruning older committed versions. With an invalid v2 manifest, the read still returned an error and the v1 blob remained intact. After restoring that manifest, the next read returned the v2 blob and cleaned up v1. The two changes compose with the regression test placed alongside this branch’s save tests.Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T15:16:00Z.
Review: APPROVED
Tested
6a2c18e2on Windows 11, RTX 5070, MSVC:cargo test -p victory-hle xgamesave8 passed, includinga_folder_named_like_a_version_does_not_remove_the_save.version_numberaccepting only the canonical form (number.to_string() == digits) closes the hole wherev01,v001orv+1parsed as version 1 and recovery deleted the realv1through the rebuilt name. Strays are now neither counted nor removed.v1→v2) with the strays present. That's the regression that mattered.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:12:50Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
6a2c18e:cargo test -p victory-hlepasses, 96 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Pull request closed