XGameSave: keep an old-layout save whose blob cannot be read (#242) #327
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/fxceless--victory-fork!327
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-327"
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?
@PAYS0 on GitHub · 2026-11-24 23:34 UTC · original
PAYS0:fix/xgamesave-legacy-migration→main· +68 −9 · 1 files · 1 commits · openFixes #242.
Problem
Migrating a container of the old one-file-per-blob layout (
migrateincrates/victory-hle/src/modules/xgamesave.rs) built its blob list withread_dir(..).flatten().filter_map(..), so a folder entry or blob that could not be read was silently skipped. It then committed v1 with the remaining blobs and deleted the old folder, so the unread blob was lost for good.Fix
legacy_blobshelper in a loop that returns the first error for a folder entry or a recognized (encoded) blob name..displayfile is read as before.Tests
an_unreadable_old_blob_keeps_the_old_layout(Windows only): holds one blob open with no sharing, so reading it fails. The firstProvider::openkeeps both files and commits nothing; after the handle is closed, the next open moves both blobs over.cargo test -p victory-hleon Windows 11: 96 passed, 0 failed. No clippy warnings in the changed file.Developed with Claude Code on Claude Opus 5.5.
🤖 Generated with Claude Code
@kaayzouee on GitHub · 2026-11-25 00:22 UTC · original
Duplicate of #322?
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.