mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
On Windows, a directory that's set as the current working directory is not allowed to be removed. This can cause error on `deleteTree` if the CWD is set to the file to be removed and will cause `error.FileBusy`. However, due to `tmp.cleanup()` ignoring the errors, the folder removal error will be ignored. The only test violating this is `windows_spawn`. As a solution, setting the parent directory to be the CWD before deletion will allow the cleanup to pass.