Repository navigation
VFS: RemoveDirectoryW fails on a non-empty merged directory - #1033
Closed
DavidM1911 wants to merge 1 commit into
Closed
DavidM1911 wants to merge 1 commit into
DavidM1911 wants to merge 1 commit into
Conversation
remove_dir whiteouted the game folder without checking its merged contents, so a title's 'remove if empty' cleanup permanently hid non-empty data folders in every later run. It now returns ERROR_DIR_NOT_EMPTY when the overlay copy or any non-whited-out original child remains, matching Windows.
Collaborator
|
Thanks. #997 is fixed by #1016 (merged as 47efa2e), which has more of the cases under test (the overlay kept on failure, subdirectories, the whiteouts after a reload). Note for next time: the description lists a test |
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vfs::remove_dirwhiteouted the game folder without checking its merged contents, so a title's "remove if empty" cleanup permanently hid non-empty data folders in every later run (whiteouts persist inoverlay\.xcl_whiteouts). It now lists the merged directory — overlay entries plus original entries that aren't whited out — and returnsERROR_DIR_NOT_EMPTY(145) when it isn't empty, matching Windows.Fixes #997
What is in it
vfs.rs:remove_dirrefuses withERROR_DIR_NOT_EMPTYwhen the merged view of the directory has any entry; whiteouts only an empty one.directoriesnow removes each fixture child beforeremove_dir;recreating_removed_directory_does_not_resurrect_original_childrenemptiesdatafirst; newremove_dir_rejects_non_empty_merged_directorycovers original-only children, overlay children, and whited-out children.vfs_hooks.rs:find_first_on_whited_out_and_recreated_directorydeletes the fixture files before removingdata.Tested
cargo test --workspace -- --test-threads=4on Windows 11 x64, RTX 3060 Ti: 676 passed / 0 failed / 41 ignored.cargo test -p xcl --lib vfs: 19 passed;vfs_hooks::tests::find_first_on_whited_out_and_recreated_directorypasses.truncate_existing_validation_errorsfails intermittently on this machine on cleanmaintoo (pre-existing, unrelated —GetLastErrorreturns 127 where 5 is expected).Regression run
main
a6f5f7a(NVIDIA GeForce RTX 3060 Ti, , 60 s):this PR's head
e6aeedfe(same title/GPU/seconds):Not tested
RemoveDirectoryWon a game folder.AI use