HLE: a look-alike version folder no longer deletes a save (fixes #870) #1035
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1035"
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 acleofe on 2026-11-24T15:14:34Z.
What
currenttakes a container folder's versions only from names exactly ascommitwrites them (v1, neverv01orv+1), through a newversion_number. Folders that only look like versions are left alone.Why
strip_prefix('v')thenparse::<u64>()acceptsv01andv+1as version 1. With a committedv1and a strayv01beside it (a sync tool, a hand copy, a backup restore), both count as 1: the cleanup removes the older versions by their rebuilt names,v1, so it deletes the real save, and the manifest read then fails and the container reads as empty.With
v01,v1andv2,v1is deleted, the second removal fails NotFound, and every read errors, so the title sees no save; its next write commits a newv1and the read after it deletes that one too. Every later save is lost.Test
a_look_alike_version_folder_loses_no_save: strayv01andv+1copies beside a committed version leave it readable, and two later writes are both visible. Fails before this change.version_folder_names_are_exact: accepted and refused names.cargo clippy --workspace --all-targets [--all-features] --locked -- -D warningsandcargo test --workspace --lockedpass.🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T16:30:30Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
bff45b7:cargo test -p victory-hlepasses, 97 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Pull request closed