XGameSave: defer container deletion until work dispatch #107
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/108"
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 ivall/xcl. Originally posted by certified-retart on 2026-11-23T11:17:55Z.
A title using a manual work port could submit a container delete, see the operation still pending, and find its save already gone. A terminated queue could report E_ABORT after the same deletion.
Resolve the container path while the caller's inputs are valid, and delete it in the queued work callback. Serialize deletion with blob updates and report the status through XGameSaveDeleteContainerResult. Both delete entry points now apply the same name length checks as container creation.
Three synthetic tests cover manual dispatch with released inputs, queue termination before work runs or before submission, and invalid arguments preserving existing saves. On Windows, 432 library tests and 2 launcher integration tests passed with a single test thread. The library suite reported 16 ignored.
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-23T11:22:08Z.
Nice fix — deferring async container deletion until work dispatch and serializing it with
apply()is much cleaner and strictly supersedes #95 (which only added the empty/overlong name guard). I've closed #95 in favor of this PR.Note: #97 touches the complementary parts of
gamesave.rs(atomic~xcltmp+MoveFileExWwrites insideapply(), NTFS case-insensitive lookups, and nulloutvalidation inXGameSaveInitializeProviderResult) — happy to rebase #97 cleanly on top once this lands.Imported from ivall/xcl. Originally posted by certified-retart on 2026-11-23T11:24:12Z.
Thanks for the name-validation fix in #95 and for coordinating the overlap. I checked the current heads locally: #97 at
2d94699and #108 atb3dd82dmerge cleanly with git merge-tree. The mutation lock in #108 covers apply(), including the atomic write path proposed in #97.Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T11:32:52Z.
Merged. It conflicted with #95's identical name check, which had landed on
mainwith #96–#102 before #95 was closed; resolved in favour of your deferred form (delete_path+delete_containerunderSAVE_MUTATION). Checked on Windows 11 with an RX 9070:cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), lib tests also withXCL_SPLIT_WAVE64=1; Unicorn Overlord runs with #107–#109 merged. Thanks!