VFS: report existing game files on CREATE_ALWAYS #158
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!158
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/158/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?
@ebarr24 on GitHub · 2026-11-23 17:47 UTC · original
ebarr24:fix/vfs-create-always-last-error→main· +107 −29 · 2 files · 1 commits · merged 2026-11-23 21:08 UTCWhen
CREATE_ALWAYSoverwrites an existing file, Win32 returns a valid handle and setsGetLastError()toERROR_ALREADY_EXISTS(183). XCL's first overwrite of a game file creates a new physical overlay file. That open succeeds with last error0, so the title sees the file as newly created. Win32 CreateFileW contractThe
CreateFileW,CreateFileA, andCreateFile2hooks share the same open decision. When a visible original file has no overlay entry, reportERROR_ALREADY_EXISTSafter the redirected overwrite succeeds. The test covers the first overwrite, an existing overlay file, a new path, and a previously deleted path. It checks the original bytes and verifies that a native open failure preserves its error.Verification
On Windows 11 25H2 (26200.9711), Rust 1.100.0
x86_64-pc-windows-gnu, RTX 3080 (driver 616.92), and DXC 1.9.2609.5:db5dc26, overwriting a game file for the first time succeeds with0instead of183.323767fthe regression passes.9f1a048with the independent fixture test fix reported 569 passes, zero failures and 39 ignored. Two native-wave64 tests and the unconfigured retail-sample tests returned early. Fixture test fix #157AI-assisted patch preparation and verification.
@ivall on GitHub · 2026-11-23 21:09 UTC · original
Merged (main
6da33fa). Checked on an RX 9070 (RDNA4) with the 22 PRs merged together on maineaa36b6:cargo build --workspace && cargo test --workspace -- --test-threads=4- 582 unit tests passed, 0 failed (20 ignored), the integration and e2e tests passed too; and the retail game still reaches its first menu (646 frames in 30 s, no device removal).