VFS: FindFirstFileExW with FindExSearchLimitToDirectories is listed too #63
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/64"
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 gefydev on 2026-11-22T23:15:38Z.
hk_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.Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T10:20:57Z.
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!