VFS: RemoveDirectoryW refuses a non-empty folder (#997) #1068
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!1068
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1068/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?
@Numbers-iwnl on GitHub · 2026-11-24 11:15 UTC · original
Numbers-iwnl:fix/vfs-remove-non-empty-dir→main· +81 −0 · 2 files · 1 commits · closed without mergingFixes #997.
What is in it
Vfs::remove_dirnow reads the merged directory before changing anything: overlay entries plus game entries that are not whiteouted. When it holds an entry the call returnsERROR_DIR_NOT_EMPTYand records nothing, which is whatRemoveDirectoryWdoes on Windows. Before this, a game folder with visible files was whiteouted straight away, so the deletion reported success andoverlay\.xcl_whiteoutskept the whole subtree hidden in every later run.merged_dir_has_entries(rel); both branches ofremove_diruse it, so an overlay folder that still holds a file is refused for the same reason.vfs::tests::directories,vfs::tests::recreating_removed_directory_does_not_resurrect_original_children,vfs_hooks::tests::find_first_on_whited_out_and_recreated_directory. They now delete the entries first. Their assertions about whiteouts, about recreated folders not resurrecting original children, and about listing a recreated folder are unchanged.vfs::tests::a_non_empty_directory_is_not_removed: a game-only folder is refused and nothing is hidden, an overlay folder holding a file is refused, an empty game folder is removed, a folder whose entries are all whiteouted counts as empty, and a missing folder keepsERROR_FILE_NOT_FOUND.Tested
cargo test --workspace -- --test-threads=4: 738 passed, 0 failed, 41 ignored (SKIPPED GPU tests: none — the device reports wave64 and mesh shaders, so no test skipped itself on those grounds).cargo test -p xcl --lib: 695 passed, 0 failed, 21 ignored.cargo test -p xcl --test e2e: 3 passed (needscargo build --workspacefirst forxcl_testtitle.exe/testgame_mw.dll).cargo build --workspace: clean apart from the pre-existing deprecatedfetch_updatewarning inhle/xgameruntime/mod.rs:547.Regression run
Not run. No title was run in this environment, so there is no
xcl-smokeblock to compare. See Not tested.Not tested
scripts/smoke.ps1on a real title, frommainand from this head. The change only adds a check in front of an existing failure path and touches nothing on the success path or in the overlay write, but a runtime change still needs the smoke comparison before it can merge.Vfsentry points with synthetic trees.AI use
@Numbers-iwnl on GitHub · 2026-11-24 11:16 UTC · original
Closing under the model policy in CONTRIBUTING.md: the diff and tests were written with DeepSeek, which this repository closes without review. The analysis behind it is in #997, and the branch stays at Numbers-iwnl/xcl:fix/vfs-remove-non-empty-dir.
Pull request closed