XGameSave: a stray or unreadable version folder never costs the save (cherry-pick of upstream #1729) #17
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/uiliannn--VItoriaBr!17
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/17/head"
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?
@flale1 on GitHub · 2026-11-25 13:09 UTC · original
flale1:fix/xgamesave-stray-versions→main· +129 −24 · 1 files · 1 commits · merged 2026-11-25 13:46 UTCThis is a cherry-pick of
b8dbcbaby moe-miau, merged upstream in Marvisak/VIctory#1729 (fixes upstream #870). It was item26e03c3in #4.The problem.
current()deletes every older version folder before it reads the newest one's manifest (xgamesave.rs:197-199). If the newestv<N>folder is stray or unreadable (for example a partial write), the older good versions are already gone when the read fails, and the player loses the save.The change. Upstream's fix, unchanged: a version only replaces older ones once it reads back, a folder that is not a canonical version never removes a committed save, and when no version is readable the folder is refused and kept. Applied with
git cherry-pick -x, so the original author is kept; it merges without conflicts one7f9af5.Tests. CI on my fork, with
--no-fail-fastso every crate runs (run):victory-hle103 passed, 0 failed, including the newan_unreadable_newer_version_does_not_cost_the_save,no_readable_version_is_refused_and_keptanda_noncanonical_folder_does_not_remove_a_committed_save; bothcargo clippysteps pass. The only failures are the three already failing onmain(run 45617591420):dynamic_allocation_finds_contiguous_range_crossing_search_cursor,warp_budget_saturates_without_wraparound_and_preserves_draw_fieldsanddepth_bounds_pipeline_loads_and_filters_draws. The Linuxportablejob also fails onmain(unused variable: csinvictory-shader), unrelated to this change.Not tested with the game.
AI-assisted (Claude Code).