fix(hle): a save version that cannot be removed does not fail the container #253
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!253
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@mutlusinan on GitHub · 2026-11-27 20:09 UTC · original
mutlusinan:fix/saves-held-version→main· +61 −2 · 1 files · 1 commits · openProblem
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.@mutlusinan on GitHub · 2026-11-27 20:21 UTC · original
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.@1tsethan on GitHub · 2026-11-27 23:00 UTC · original
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.
@cloph-dsp on GitHub · 2026-11-28 00:17 UTC · original
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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.