XGameSave: a folder named like a version, such as v01, does not remov… #1006

Closed
github-bot wants to merge 1 commit from gh-pr/1006/head into gh-pr/1006/base
Owner

@⁠NATON4 on GitHub · 2026-11-24 14:55 UTC · original
hle/save-version-names → main · +44 −1 · 1 files · 1 commits · closed without merging

…e the save

Recovery read every folder v<digits> as a committed version, so a v01, v001 or v+1 beside the committed v1 also 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 as commit names 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, v001 and v+1 folders, and checks that the save reads back, the strays are left alone and the next update goes on to v2.

Closes #870.

**@⁠NATON4** on GitHub · 2026-11-24 14:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/1006) `hle/save-version-names` → `main` · +44 −1 · 1 files · 1 commits · closed without merging …e the save Recovery read every folder `v<digits>` as a committed version, so a `v01`, `v001` or `v+1` beside the committed `v1` also 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 as `commit` names 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`, `v001` and `v+1` folders, and checks that the save reads back, the strays are left alone and the next update goes on to `v2`. Closes #870.
Recovery read every folder `v<digits>` as a committed version, so a `v01`,
`v001` or `v+1` beside the committed `v1` also 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 as `commit` names 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`, `v001` and `v+1` folders, and
checks that the save reads back, the strays are left alone and the next
update goes on to `v2`.

Closes #870.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:16:45 +00:00
github-bot closed this pull request 2026-11-26 04:16:45 +00:00
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 15:03 UTC · original

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.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 15:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/1006#issuecomment-7135387751) Verified the canonical-name fix together with the [older-save preservation follow-up](https://github.com/THE-PRO-GAME/VIctory/pull/2) 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.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 15:12 UTC · original

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-hle passes, 96 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 15:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/1006#issuecomment-7135645500) 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-hle` passes, 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
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
github/Marvisak--VIctory!1006
No description provided.