VFS: reject CREATE_ALWAYS on original directories (#577) #639

Open
fladit123 wants to merge 1 commit from upstream-pr/644 into main
fladit123 commented 2026-11-24 02:49:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-24T02:49:33Z.


Part of #577 (item 1 only).

Reject CREATE_ALWAYS on an original game directory that is not present in the overlay, before prepare_write can create an overlay file that hides the directory.

What is in it

  • Reject invalid directory replacement before modifying the overlay, matching native Win32 error codes.
  • Add a regression test covering both flag configurations, overlay absence, directory visibility, and preservation of original file contents.
  • Preserve valid replacement of original files.
  • Rebase onto main 6d12f58a229bc73889878a448c64dc3af25eeba0.

Tested

  • Windows 11 Pro 26H2, NTFS.
  • Intel Core i5-12400F, 32 GB RAM.
  • NVIDIA GeForce RTX 4060 8 GB, driver 610.88.
  • Rust 1.100.0 MSVC, DXC 1.8.2502.11.
  • Candidate: 9c1eb168cd93b59126baea688bb966eb8c92522d.

Native Win32 and the corrected VFS agree:

Flags Win32 error
None ERROR_ACCESS_DENIED (5)
FILE_FLAG_BACKUP_SEMANTICS ERROR_FILE_EXISTS (80)

Validation results:

  • VFS: 12 passed, 0 failed.
  • VFS hooks: 11 passed, 0 failed.
  • The new CREATE_ALWAYS regression test passed.
  • Release builds of both main and candidate passed.
  • git diff --check passed.
  • Workspace: 1,423 passed, 1 failed, 46 ignored, exit code 101.

The sole workspace failure was blob_enumeration_sees_one_submitted_update, matching the existing report in #2421.

The failure was independently reproduced locally on the exact unmodified base commit: 4 of 29 enumerations mixed submitted updates on main, compared with 5 of 29 in the isolated candidate run.

Explicit runtime skips included:

  • Native wave64 GPU checks in gpu::dxil::kernel, gpu::recomp::lower, gpu::recomp::lower_dxil, and gpu::recomp::tests.
  • Unsupported F16 instruction variants associated with #1426.
  • pso_measurement_compiles_an_exact_synthetic_record: Windows Developer Mode required.
  • heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.

These runtime skips are separate from the harness's ignored-test count.

Regression run

Both builds were tested locally on the same title for 60 seconds, with networking disabled and separate fresh title-data roots.

Main:

xcl-smoke v1
commit: 6d12f58a229bc73889878a448c64dc3af25eeba0
gpu: NVIDIA GeForce RTX 4060
title: be9c57f5
seconds: 60
exit: 0x0
frames shown: 708 (PresentX 708)
presents per 2 s (last 3): 23 26 31
device removals: 0
crashes: 0
peak commit: 8823 MB

PR:

xcl-smoke v1
commit: 9c1eb168cd93b59126baea688bb966eb8c92522d
gpu: NVIDIA GeForce RTX 4060
title: be9c57f5
seconds: 60
exit: 0x0
frames shown: 772 (PresentX 772)
presents per 2 s (last 3): 26 26 23
device removals: 0
crashes: 0
peak commit: 8816 MB

The candidate achieved 109.04% of main's frames and 99.92% of its peak committed memory.

An additional control was performed with reversed execution order and identical executable hashes:

Metric Main Candidate
Frames shown 167 423
Peak commit (MB) 14538 10950
Last three present windows 9 10 10 0 0 0
Device removals 0 0
Crashes 0 0
Exit code 0 0

Both pairs satisfy the numerical regression thresholds.

However, substantial run-to-run variability was observed. Earlier tests on a previous base also failed the numerical regression thresholds.

Inspection of the second pair's activity logs revealed prolonged zero-present intervals in both main and candidate, accompanied by closely matching target-page and local video-memory allocations. Main subsequently resumed presenting frames, while the candidate reached the 60-second cutoff before recovery.

These observations suggest similar loading or processing phases occurring at different times, but do not establish the underlying cause. No FPS improvement or memory optimization is claimed.

Previous independent AMD RX 9070 XT validation by @eizispark on the original PR revision remains documented in the PR discussion:
https://github.com/ivall/xcl/pull/644#issuecomment-7121024016

Not tested

  • Native wave64 on my local GPU.
  • AMD or Intel GPU validation of this exact rebased commit.
  • Junction-specific behavior.
  • Whether the retail smoke exercised the specific VFS regression path.
  • Equivalent gameplay progress across all smoke runs.
  • Items 2 and 3 of #577, which remain outside this PR's scope.

AI use

  • OpenAI Codex: original investigation, implementation, and regression tests.
  • ChatGPT (GPT-6.2): review, validation planning, PowerShell guidance, comparative log analysis, and PR description.
  • Builds, tests, and smoke runs for the rebased candidate were executed locally by me on Windows.
<!-- greyfinch-sync:ivall/xcl:issue:5465147619 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-24T02:49:33Z. --- Part of #577 (item 1 only). Reject `CREATE_ALWAYS` on an original game directory that is not present in the overlay, before `prepare_write` can create an overlay file that hides the directory. **What is in it** - Reject invalid directory replacement before modifying the overlay, matching native Win32 error codes. - Add a regression test covering both flag configurations, overlay absence, directory visibility, and preservation of original file contents. - Preserve valid replacement of original files. - Rebase onto main `6d12f58a229bc73889878a448c64dc3af25eeba0`. **Tested** - Windows 11 Pro 26H2, NTFS. - Intel Core i5-12400F, 32 GB RAM. - NVIDIA GeForce RTX 4060 8 GB, driver 610.88. - Rust 1.100.0 MSVC, DXC 1.8.2502.11. - Candidate: `9c1eb168cd93b59126baea688bb966eb8c92522d`. Native Win32 and the corrected VFS agree: | Flags | Win32 error | |---|---| | None | ERROR_ACCESS_DENIED (5) | | FILE_FLAG_BACKUP_SEMANTICS | ERROR_FILE_EXISTS (80) | Validation results: - VFS: 12 passed, 0 failed. - VFS hooks: 11 passed, 0 failed. - The new CREATE_ALWAYS regression test passed. - Release builds of both main and candidate passed. - `git diff --check` passed. - Workspace: 1,423 passed, 1 failed, 46 ignored, exit code 101. The sole workspace failure was `blob_enumeration_sees_one_submitted_update`, matching the existing report in #2421. The failure was independently reproduced locally on the exact unmodified base commit: 4 of 29 enumerations mixed submitted updates on main, compared with 5 of 29 in the isolated candidate run. Explicit runtime skips included: - Native wave64 GPU checks in `gpu::dxil::kernel`, `gpu::recomp::lower`, `gpu::recomp::lower_dxil`, and `gpu::recomp::tests`. - Unsupported F16 instruction variants associated with #1426. - `pso_measurement_compiles_an_exact_synthetic_record`: Windows Developer Mode required. - `heap_window_out_of_memory_falls_back_to_the_switch_form`: no heap windows. These runtime skips are separate from the harness's ignored-test count. **Regression run** Both builds were tested locally on the same title for 60 seconds, with networking disabled and separate fresh title-data roots. Main: ``` xcl-smoke v1 commit: 6d12f58a229bc73889878a448c64dc3af25eeba0 gpu: NVIDIA GeForce RTX 4060 title: be9c57f5 seconds: 60 exit: 0x0 frames shown: 708 (PresentX 708) presents per 2 s (last 3): 23 26 31 device removals: 0 crashes: 0 peak commit: 8823 MB ``` PR: ``` xcl-smoke v1 commit: 9c1eb168cd93b59126baea688bb966eb8c92522d gpu: NVIDIA GeForce RTX 4060 title: be9c57f5 seconds: 60 exit: 0x0 frames shown: 772 (PresentX 772) presents per 2 s (last 3): 26 26 23 device removals: 0 crashes: 0 peak commit: 8816 MB ``` The candidate achieved 109.04% of main's frames and 99.92% of its peak committed memory. An additional control was performed with reversed execution order and identical executable hashes: | Metric | Main | Candidate | |---|---:|---:| | Frames shown | 167 | 423 | | Peak commit (MB) | 14538 | 10950 | | Last three present windows | 9 10 10 | 0 0 0 | | Device removals | 0 | 0 | | Crashes | 0 | 0 | | Exit code | 0 | 0 | Both pairs satisfy the numerical regression thresholds. However, substantial run-to-run variability was observed. Earlier tests on a previous base also failed the numerical regression thresholds. Inspection of the second pair's activity logs revealed prolonged zero-present intervals in both main and candidate, accompanied by closely matching target-page and local video-memory allocations. Main subsequently resumed presenting frames, while the candidate reached the 60-second cutoff before recovery. These observations suggest similar loading or processing phases occurring at different times, but do not establish the underlying cause. No FPS improvement or memory optimization is claimed. Previous independent AMD RX 9070 XT validation by @eizispark on the original PR revision remains documented in the PR discussion: https://github.com/ivall/xcl/pull/644#issuecomment-7121024016 **Not tested** - Native wave64 on my local GPU. - AMD or Intel GPU validation of this exact rebased commit. - Junction-specific behavior. - Whether the retail smoke exercised the specific VFS regression path. - Equivalent gameplay progress across all smoke runs. - Items 2 and 3 of #577, which remain outside this PR's scope. **AI use** - OpenAI Codex: original investigation, implementation, and regression tests. - ChatGPT (GPT-6.2): review, validation planning, PowerShell guidance, comparative log analysis, and PR description. - Builds, tests, and smoke runs for the rebased candidate were executed locally by me on Windows.
eizispark commented 2026-11-24 07:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-24T03:22:14Z.


Hardware check of e176775e13d92e41ed86afa418f21a5907586c35 (verified clean merge with main 63cdc25): pass.

Tested

  • Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profile
  • cargo test --workspace -- --test-threads=4: 688 passed, 0 failed, 41 ignored (GPU tests skipped on this adapter: none)
  • cargo test -p xcl --lib vfs_hooks: 11 passed, 0 failed (including the new CREATE_ALWAYS original-directory regression test)

Regression run
main (dd2ae9a):

xcl-smoke v1
commit: dd2ae9a70af5eb5aad60f02d86e386b72abe1e95
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1666 (PresentX 1666)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14851 MB

PR (e176775):

xcl-smoke v1
commit: e176775e13d92e41ed86afa418f21a5907586c35
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1667 (PresentX 1667)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14848 MB

Not tested

  • wave32-only GPUs (NVIDIA / Intel); gameplay past the menus

AI use

  • Antigravity (Gemini 4 Carbon) ran the build, test suite, and scripts/smoke.ps1 harness on this machine and formatted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7121024016 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/644#issuecomment-7121024016). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-24T03:22:14Z. --- Hardware check of `e176775e13d92e41ed86afa418f21a5907586c35` (verified clean merge with `main` `63cdc25`): **pass**. **Tested** - Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, release + test profile - `cargo test --workspace -- --test-threads=4`: `688 passed, 0 failed, 41 ignored` (GPU tests skipped on this adapter: `none`) - `cargo test -p xcl --lib vfs_hooks`: `11 passed, 0 failed` (including the new `CREATE_ALWAYS` original-directory regression test) **Regression run** `main` (`dd2ae9a`): ``` xcl-smoke v1 commit: dd2ae9a70af5eb5aad60f02d86e386b72abe1e95 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1666 (PresentX 1666) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14851 MB ``` PR (`e176775`): ``` xcl-smoke v1 commit: e176775e13d92e41ed86afa418f21a5907586c35 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1667 (PresentX 1667) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14848 MB ``` **Not tested** - wave32-only GPUs (NVIDIA / Intel); gameplay past the menus **AI use** - Antigravity (Gemini 4 Carbon) ran the build, test suite, and `scripts/smoke.ps1` harness on this machine and formatted this report.
fladit123 commented 2026-11-24 17:06:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-24T16:41:17Z.


Hey @eizispark! Main has moved quite a bit and #644 now has a merge conflict. I'm preparing a rebased version that preserves the original VFS fix and regression test. Would you be available to rerun the paired smoke tests once I have the final candidate ready? No worries if you're busy. Thanks again for your previous help!

<!-- greyfinch-sync:ivall/xcl:comment:7138052965 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/644#issuecomment-7138052965). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-24T16:41:17Z. --- Hey @eizispark! Main has moved quite a bit and #644 now has a merge conflict. I'm preparing a rebased version that preserves the original VFS fix and regression test. Would you be available to rerun the paired smoke tests once I have the final candidate ready? No worries if you're busy. Thanks again for your previous help!
JJAutoCompare commented 2026-11-25 07:05:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:30:20Z.


Empirical test report (e176775e)

Hardware / environment

  • Commit e176775e13d92e41ed86afa418f21a5907586c35 (PR #644), detached HEAD.
  • Windows build 10.0.26200.9974, AMD Ryzen 7 3800X 8-Core Processor, Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), DXC 1.9.2609.5 (01b62ad47).
  • Unoptimized test profile. Focused CPU runs used XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. All commands ran outside Invoke-ArcTest.ps1, without holding the Arc GPU mutex.

Commands and results

  • cargo test --workspace --no-run exited 0. Workspace test binaries compiled and zero tests ran.
  • cargo test -p xcl --lib vfs::tests:: exited 101 with 9 passed / 1 failed / 0 ignored / 0 skipped.
  • cargo test -p xcl --lib vfs_hooks::tests:: exited 0 with 11 passed / 0 failed / 0 ignored / 0 skipped.
  • cargo test -p xcl --lib vfs::tests::truncate_existing_validation_errors -- --exact exited 101 with 0 passed / 1 failed / 0 ignored / 0 skipped. This reran the same failure.
  • The focused log contained zero lines starting with case-sensitive SKIPPED .

Observed behavior

  • The new directory regression test passed. For an original directory absent from the overlay, CREATE_ALWAYS matched native CreateFileW with ERROR_ACCESS_DENIED (5) without flags and ERROR_FILE_EXISTS (80) with FILE_FLAG_BACKUP_SEMANTICS. Both cases left the overlay absent and the original directory visible with its contents intact.
  • The existing original-file replacement test passed. The existing TRUNCATE_EXISTING validation test read Win32 error 127 where it expected 5, both in the suite and in isolation. No base-commit comparison was run.

Not tested

  • Full GPU workspace suite and game smoke runs.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr644-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154858929 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7154858929). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T06:30:20Z. --- ### Empirical test report (e176775e) **Hardware / environment** - Commit `e176775e13d92e41ed86afa418f21a5907586c35` (PR #644), detached HEAD. - Windows build 10.0.26200.9974, AMD Ryzen 7 3800X 8-Core Processor, Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), DXC 1.9.2609.5 (01b62ad47). - Unoptimized test profile. Focused CPU runs used `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. All commands ran outside `Invoke-ArcTest.ps1`, without holding the Arc GPU mutex. **Commands and results** - `cargo test --workspace --no-run` exited 0. Workspace test binaries compiled and zero tests ran. - `cargo test -p xcl --lib vfs::tests::` exited 101 with 9 passed / 1 failed / 0 ignored / 0 skipped. - `cargo test -p xcl --lib vfs_hooks::tests::` exited 0 with 11 passed / 0 failed / 0 ignored / 0 skipped. - `cargo test -p xcl --lib vfs::tests::truncate_existing_validation_errors -- --exact` exited 101 with 0 passed / 1 failed / 0 ignored / 0 skipped. This reran the same failure. - The focused log contained zero lines starting with case-sensitive `SKIPPED `. **Observed behavior** - The new directory regression test passed. For an original directory absent from the overlay, `CREATE_ALWAYS` matched native `CreateFileW` with `ERROR_ACCESS_DENIED` (5) without flags and `ERROR_FILE_EXISTS` (80) with `FILE_FLAG_BACKUP_SEMANTICS`. Both cases left the overlay absent and the original directory visible with its contents intact. - The existing original-file replacement test passed. The existing `TRUNCATE_EXISTING` validation test read Win32 error 127 where it expected 5, both in the suite and in isolation. No base-commit comparison was run. **Not tested** - Full GPU workspace suite and game smoke runs. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr644-focused.log and published.
DavidM1911 commented 2026-11-25 13:05:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:31:40Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7162495186 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7162495186). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:31:40Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
fladit123 commented 2026-11-25 20:08:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-25T19:29:18Z.


Thanks @DavidM1911 for checking!

I've confirmed that the original CREATE_ALWAYS directory issue is still present on current main (06055a7). I also noticed that main now captures GetLastError immediately in truncate_existing_validation_errors, addressing the previously observed error 127 discrepancy.

I'll prepare a clean rebase while preserving the original fix and regression test. Before updating the PR, I want to repeat the workspace validation and resolve the outstanding smoke-test discrepancies.

Thanks again for the independent verification.

<!-- greyfinch-sync:ivall/xcl:comment:7172366127 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7172366127). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-25T19:29:18Z. --- Thanks @DavidM1911 for checking! I've confirmed that the original CREATE_ALWAYS directory issue is still present on current main (`06055a7`). I also noticed that main now captures GetLastError immediately in truncate_existing_validation_errors, addressing the previously observed error 127 discrepancy. I'll prepare a clean rebase while preserving the original fix and regression test. Before updating the PR, I want to repeat the workspace validation and resolve the outstanding smoke-test discrepancies. Thanks again for the independent verification.
fladit123 commented 2026-11-25 22:06:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-25T21:30:29Z.


Rebased onto current main (6d12f58) and resolved the merge conflicts.

The updated candidate (9c1eb16) passed all 23 VFS/VFS hook tests. The full workspace run had one failure, which was reproduced on the unmodified base and matches #2421.

Both local RTX 4060 smoke pairs meet the numerical regression thresholds. Run-to-run variability and zero-present intervals observed on both builds are documented in the updated description.

Ready for another review. Thanks for your patience!

<!-- greyfinch-sync:ivall/xcl:comment:7175168482 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7175168482). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-25T21:30:29Z. --- Rebased onto current main (`6d12f58`) and resolved the merge conflicts. The updated candidate (`9c1eb16`) passed all 23 VFS/VFS hook tests. The full workspace run had one failure, which was reproduced on the unmodified base and matches #2421. Both local RTX 4060 smoke pairs meet the numerical regression thresholds. Run-to-run variability and zero-present intervals observed on both builds are documented in the updated description. Ready for another review. Thanks for your patience!
DavidM1911 commented 2026-11-26 03:06:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:00:14Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7181308121 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7181308121). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:00:14Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
github-actions[bot] commented 2026-11-30 08:41:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:41:37Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273225302 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7273225302). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:41:37Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
fladit123 commented 2026-11-30 13:28:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-30T13:28:03Z.


Still relevant and awaiting maintainer review. The PR remains mergeable and fixes invalid CREATE_ALWAYS operations on original directories. Independent validation on an RTX 3060 Ti also passed.

<!-- greyfinch-sync:ivall/xcl:comment:7279886816 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7279886816). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-30T13:28:03Z. --- Still relevant and awaiting maintainer review. The PR remains mergeable and fixes invalid CREATE_ALWAYS operations on original directories. Independent validation on an RTX 3060 Ti also passed.
Foniass commented 2026-12-01 03:52:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:52:22Z.


Triage (#1607) – head 9c1eb16

#618 works on the same issue (#577) but on its second case, creating files or directories beneath an existing virtual file (check_parent_types in prepare_write / create_dir). This PR covers the first case: CREATE_ALWAYS on a directory that exists only in the game folder now fails before prepare_write, so no overlay file hides the directory. The two do not overlap, and main still has the old is_file()-only replaces_original.
The test also checks the native CreateFileW error codes (outside Wine), so the ERROR_ACCESS_DENIED / ERROR_FILE_EXISTS split with FILE_FLAG_BACKUP_SEMANTICS is backed by a real run. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300148687 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/644#issuecomment-7300148687). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:52:22Z. --- **Triage (#1607)** – head 9c1eb16 #618 works on the same issue (#577) but on its second case, creating files or directories beneath an existing virtual file (`check_parent_types` in `prepare_write` / `create_dir`). This PR covers the first case: `CREATE_ALWAYS` on a directory that exists only in the game folder now fails before `prepare_write`, so no overlay file hides the directory. The two do not overlap, and main still has the old `is_file()`-only `replaces_original`. The test also checks the native `CreateFileW` error codes (outside Wine), so the `ERROR_ACCESS_DENIED` / `ERROR_FILE_EXISTS` split with `FILE_FLAG_BACKUP_SEMANTICS` is backed by a real run. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/644:upstream-pr/644'
git switch 'upstream-pr/644'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/644'
git switch 'upstream-pr/644'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/644'
git switch 'upstream-pr/644'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/644'
git switch 'main'
git merge --squash 'upstream-pr/644'
git switch 'main'
git merge --ff-only 'upstream-pr/644'
git switch 'main'
git merge 'upstream-pr/644'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!639
No description provided.