XGameSave: a legacy blob that cannot be read stops the migration instead of being dropped #322
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/322"
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 RenzoWit35 on 2026-11-24T23:34:31Z.
Fixes #242.
migrate()collected old-layout blobs through.flatten().filter_map(... read(..).ok()?), so adirectory entry or blob that failed to read was skipped, v1 was committed without it, and the
old folder was removed: the blob was lost. It is now a loop that returns before committing on a
directory-entry error or a failed read of a name that decodes as a blob. The old container stays
in place, and the next open tries again. Names that are not blobs (
.display,*.new) are stillskipped, and display metadata is unchanged.
Test
an_unreadable_old_blob_is_not_dropped: an old container withDataand a folder namedHeader(unreadable as a file) is left whole with nothing committed; onceHeaderis areadable file, the next open migrates both. Fails on
main(old folder deleted), passes here.Note for review: a blob that stays unreadable means its container stays unlisted on every open,
with no warning logged.
Testing
On Windows 11, MSVC Rust 1.98.1, branch alone on top of
main(2119b0e):cargo clippy --workspace --all-targets --locked -- -D warnings, the same with--all-features, andcargo test --workspace --lockedall pass. The new regression test fails onmainand passes here. All nine fix branches for #242-#250 also pass together when merged.🤖 Generated with Claude Code
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.