VFS: honor read-only attributes in DeleteFileW #2809
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!2809
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2809"
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?
@CryingLaughing on GitHub · 2026-11-26 14:06 UTC · original
CryingLaughing:fix/vfs-readonly-delete→main· +211 −3 · 4 files · 1 commits · openDeleteFileWon a virtual game path could report success for a read-only file. Reject deletion of a read-only original withERROR_ACCESS_DENIEDand use native deletion semantics for an overlay copy. A rejected deletion leaves the file visible and preserves its contents. Related delete-by-handle PR #1054What is in it
crates/xcl/src/vfs.rs, check the original’s read-only attribute before recording a deletion marker. Preserve the move behavior for a read-only original.crates/xcl/src/vfs_hooks.rs, use nativeDeleteFileWfor overlay deletion, with an extended path when needed. Thecrates/xcl/tests/vfs_readonly_delete.rsintegration test exercises the installed hooks in a child process with synthetic files.Tested
80cf435643189a0ea2ec31f4e4e5642539b47815onb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. Its tree8a2dc2fcc438ce0c4a94554b5d5ae5d80fd4b8a5matches the tested overlay. Windows 11 25H2 build 26200.9974, Intel Core i5-13600K, RTX 4080 driver 621.01, Rust 1.100.0 x64 MSVC, and DXC 1.8.2502.11. Debug build and test profiles.delete_file_respects_readonly_attributetest invfs_readonly_deletefailed on the parent (0 passed, 1 failed) because virtualDeleteFileWreported success forreadonly-original.txt. The fixed tree passed 1/1. Bothreadonly-original.txtandreadonly-overlay.txtreturnedERROR_ACCESS_DENIEDand kept their contents. Writable deletion, a path longer thanMAX_PATH, a read-only move, native-path behavior, and deletion markers checked after reopening also passed.cargo build --workspace --locked -j 4passed.cargo test --workspace --locked -j 4 -- --test-threads=4 --show-outputreported 1,436 passed, 0 failed, 47 ignored, with 29 explicit skip messages in the pass count across 38 harnesses.Regression run
Independent retail smoke by Anon64 compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 99.5% of the baseline frames and used 103.1% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code.
main:
PR:
Not tested
@Anon64 on GitHub · 2026-11-26 14:44 UTC · original
Regression run of
80cf435on a newer retail title: no device removal, no crash, frames and commit within the limits.Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main
b49be18(this PR's base) and of this PR's exact head,scripts/smoke.ps1 -Game <title>for 60 s withXCL_NETWORK=0and A pressed every 4 s from 20 s. Main ran before and after a batch of 11 PRs and peaked at 23,855 and 23,844 MB, so the baseline held steady over the batch.main:
this PR:
99 % of main's frames, 103 % of its peak commit. One run each.
Not tested: the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD.
AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.
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.