HLE: abort xgamesave legacy container migration if any blob read fails #339
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!339
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/339/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?
@towiice on GitHub · 2026-11-24 23:36 UTC · original
towiice:fix/xgamesave-migrate-unreadable-blob→main· +47 −8 · 1 files · 1 commits · closed without mergingFixes #242.
migrateincrates/victory-hle/src/modules/xgamesave.rsread the old layout's blobs inside afilter_map, so a blob that failed to read (a sharing violation, a locked file, a bad directory entry) was silently left out. The partial set was then committed as version 1 andremove_dir_all(old)deleted the original, so that blob was lost for good.What is in it
migratenow loops over the directory and returnsNoneif a directory entry or the read of any file whose name decodes as a blob fails. Nothing is committed andoldstays in place, so the nextProvider::opentries again. Files that are not blobs (.display,*.new) are skipped as before.migration_aborts_without_deleting_old_when_a_blob_cannot_be_read: a directory with a blob name makes the read fail; migration leavesoldand commits nothing. Once the entry is a readable file, migration succeeds with both blobs.Tested
x86_64-pc-windows-gnullvm, debug.cargo test -p victory-hle --lib xgamesave: 8 passed, 0 failed (the 7 existing tests and the new one).Not tested
AI use
@kaayzouee on GitHub · 2026-11-25 00:24 UTC · original
Duplicate of #322?
@towiice on GitHub · 2026-11-25 02:01 UTC · original
Closing: #322 and #327 were opened for #242 before this one. Sorry for the noise.
Pull request closed