HLE: abort xgamesave legacy container migration if any blob read fails #339
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/339"
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 fxceless/victory-fork. Originally posted by towiice on 2026-11-24T23:36:59Z.
Fixes #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
Imported from fxceless/victory-fork. Originally posted by kaayzouee on 2026-11-25T00:24:24Z.
Duplicate of #322?
Imported from fxceless/victory-fork. Originally posted by towiice on 2026-11-25T02:01:50Z.
Closing: #322 and #327 were opened for #242 before this one. Sorry for the noise.
Pull request closed