You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VFS: RemoveDirectoryW on a non-empty game folder succeeds and hides the folder in every later run #997
If the folder exists only in the game files, it adds a whiteout straight away.
If the overlay has a folder of that name, it removes the overlay folder (which fails only if the overlay copy has files), then whites out the game folder. The game files under it are never looked at.
On Windows, RemoveDirectoryW on a non-empty directory fails with ERROR_DIR_NOT_EMPTY (145). Under XCL it returns success and the whole subtree disappears from the title's view. Whiteouts are saved to overlay\.xcl_whiteouts and loaded on start, so the folder stays hidden in every later run until the overlay is cleared.
The repo's own test already shows the behaviour (directories in vfs.rs, line 852): the fixture's data folder holds hello.txt and gone.txt, and remove_dir("data") returns Ok(()).
Why it matters: "remove the folder if it's empty" is a common cleanup pattern: call RemoveDirectoryW on each folder and ignore the failure. A title doing that over its install folder would lose game data folders permanently under XCL.
Expected:remove_dir returns ERROR_DIR_NOT_EMPTY when the merged view of the folder (overlay entries plus game entries that aren't whited out) has any entry. It only whites out an empty folder.
Suggested fix: in remove_dir, list the merged directory (as FindFirstFile already does for listings) and refuse when it isn't empty. Adjust the directories test to match Win32.
Not tested: found by reading the code and the existing unit test; not run (no Windows machine).
AI use: found, checked and written up by Claude Code (Claude Opus 5.5) at my request.
Fixed by #1016 (47efa2e): RemoveDirectoryW on a game folder fails with ERROR_DIR_NOT_EMPTY while its merged view has visible entries, and the overlay is left as it was.
Activity
ivall commentedon Nov 24, 2026
Fixed by #1016 (47efa2e):
RemoveDirectoryWon a game folder fails withERROR_DIR_NOT_EMPTYwhile its merged view has visible entries, and the overlay is left as it was.Linux: fix ancestor-whiteout test for non-empty dir rejection