fix(hle): a save version that cannot be removed does not fail the container #253
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/253"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by mutlusinan on 2026-11-27T20:09:56Z.
Problem
currentinmodules/xgamesave.rsremoves unfinished versions (.new) and every version older than the newest readable one, and propagated any error with?.A file of an older version held open by another program — a virus scanner, a backup in progress — cannot be deleted. With the error propagated, the container read as unreadable and every save of it failed for as long as the file was held, even though the newest version was intact.
Fix
Both removals are best-effort and logged (
debugfor.new,infofor older versions). The newest readable version is the container whatever is left below it; leftovers are removed at a later call, when the file is free.Verification
cargo check -p victory-hle --all-targets --target x86_64-pc-windows-msvc --locked— clean.#[cfg(windows)]testan_older_version_that_cannot_be_removed_does_not_fail_the_saves_after_it: holds a version's blob withshare_mode(0), saves twice more, checks the state, releases, saves again and checks the leftovers are gone (not run here: needs Windows;victory-hledoes not build on macOS).Ported from fxceless/victory-fork
6a42ed27, GPL-3.0-or-later.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mutlusinan on 2026-11-27T20:21:30Z.
Risk assessment (porting review)
.newdirectories are never read as versions (version_numberignores them), so leaving one behind is safe.share_mode(0)) and was not run here.mainate69e39c.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1tsethan on 2026-11-27T23:00:08Z.
Independent Windows validation of PR #253.
Tested commit:
0438a1b7467cfa33bfe59336cb99326ae9c4561a.cargo test --locked -p victory-hle an_older_version_that_cannot_be_removed -- --nocapture --test-threads=1Exit: 0.
Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-28T00:17:28Z.
Independent local verification of PR #253 (an older XGameSave version that cannot be removed does not fail the saves after it).
cargo test --locked, synthetic inputs only.0438a1b7467cfa33bfe59336cb99326ae9c4561a, merge base0cef07e9d766df48f0e95f13ce3bbbe2290fe9d3, worktree-localCARGO_TARGET_DIR.cargo test --locked -p victory-hle --lib -- modules::xgamesave::tests::an_older_version_that_cannot_be_removed_does_not_fail_the_saves_after_it --exact --test-threads=1 --quiet→test result: ok. 1 passed; 0 failed; 173 filtered out, exit 0.git grep -F an_older_version_that_cannot_be_removed_does_not_fail_the_saves_after_it 0cef07e9 -- crates/victory-hle/src/modules/xgamesave.rs→ exit 1 (test absent on base).git diff --check 0cef07e9 HEADclean.Only the named test was replayed; full suite not run. GPU/driver N/A (CPU-only XGameSave test). AI-assisted (Hy4 flash). No game data, assets, extracted shaders, DRM or decrypt.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T02:49:35Z.
Merged into main (
8fc2254) and shipped in v2026.11.27.10. The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!Pull request closed