VFS: FindFirstFileExW with FindExSearchLimitToDirectories is listed too #64
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!64
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/64/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?
@gefydev on GitHub · 2026-11-22 23:15 UTC · original
gefydev:vfs-find-limit-to-directories→main· +4 −2 · 1 files · 1 commits · merged 2026-11-23 10:20 UTChk_find_first_ex_wvirtualises onlyfSearchOp == FindExSearchNameMatchand passes anything else to Windows unchanged. WithFindExSearchLimitToDirectories, a search on a console path (G:\data\*) therefore reaches the PC asG:\data\*and finds nothing.That op is only a hint: the
FindFirstFileExWdocumentation says that when the file system doesn't support directory filtering, the flag is ignored and files are returned too, and callers have to checkFILE_ATTRIBUTE_DIRECTORYthemselves. So the VFS can list it like a name match. Ops above 1 (FindExSearchLimitToDevices) still pass through.Validation
The hooks are process-wide and need an initialized VFS (a global
OnceLock), so this isn't a unit test. I ran a probe alone, with a VFS that mountsG:on a temp game folder holdingdata\f.txtanddata\sub\, and the real hooks installed. Under Wine:FindFirstFileExW(G:\data\*, FindExInfoBasic, …)mainFindExSearchNameMatch. .. f.txt sub. .. f.txt subFindExSearchLimitToDirectories. .. f.txt subcargo test -p xcl --lib: 343 passed, 0 failed, on Windows GNU under Wine.@ivall on GitHub · 2026-11-23 10:20 UTC · original
Merged (
3fa4203). Checked on Windows itself with the real hooks and a VFS mountingG::FindFirstFileExW(G:\data\*)gives. .. f.txt subwith bothFindExSearchNameMatchandFindExSearchLimitToDirectories. Tested on Windows 11 with an RX 9070:cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), and Unicorn Overlord reaches its title screen with everything from this round merged. Thanks!