Zig Version
0.11.0-dev.2777+b95cdf0ae
Steps to Reproduce and Observed Behavior
This was meant to be a follow-up issue of #13073 (comment)
This should have a default and user-configurable upper bound of tries for deletion.
Otherwise, one can not detect other buggy processes continuously inserting directories or files.
As I understand it, the CI has been running into infinite loops on Windows due to DELETE_PENDING when file handles don't get closed (#15450, #15460).
Here's a minimal reproduction:
conststd=@import("std");
test {
vartmp=std.testing.tmpDir(.{});
defertmp.cleanup(); // infinite loop while retrying to delete the tmp dirvarfile=trytmp.dir.createFile("neverclose", .{});
_=file;
}Expected Behavior
deleteTree should error with something like error.TooManyRetries after some user-configurable amount of retries.
Zig Version
0.11.0-dev.2777+b95cdf0ae
Steps to Reproduce and Observed Behavior
This was meant to be a follow-up issue of #13073 (comment)
As I understand it, the CI has been running into infinite loops on Windows due to
DELETE_PENDINGwhen file handles don't get closed (#15450, #15460).Here's a minimal reproduction:
Expected Behavior
deleteTreeshould error with something likeerror.TooManyRetriesafter some user-configurable amount of retries.