XGameSave: an unreadable legacy blob can be dropped during migration #242
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#242
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Bennet0k on GitHub · 2026-11-24 22:59 UTC · original
Source
Reproduction. In a writable temporary legacy save directory, create two regular blobs with valid encoded names,
DataandHeader. MakeHeaderunreadable to the test process and confirm that reading it returnsPermissionDenied. Calling the migration code commits v1 with onlyDataand removes the old directory. This was reproduced by executing the migration helpers from2119b0ewith synthetic files on Linux. No retail save was used.Proposed fix. Replace the lossy iterator chain with a loop that propagates directory-entry errors and read errors for recognized blob names before committing. Keep skipping unrelated names and preserve the optional display metadata behavior. Leave the legacy directory intact on failure so a later call can retry. With this change in the standalone Rust harness, the failed attempt leaves both files in place, and restoring read permission migrates both blobs on retry.
Found in an AI-assisted audit of
2119b0e.github-bot referenced this issue2026-11-26 03:40:48 +00:00