mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
fs.Dir.deleteTree: Fix DirNotEmpty condition
`deleteTree` needs to retry once the directory is reported to be not empty. Otherwise, the retry condition is never reached.
This commit is contained in:
parent
23c4f55a61
commit
ce3fe72d9a
@ -2210,7 +2210,7 @@ pub const Dir = struct {
|
||||
var need_to_retry: bool = false;
|
||||
parent_dir.deleteDir(name) catch |err| switch (err) {
|
||||
error.FileNotFound => {},
|
||||
error.DirNotEmpty => need_to_retry = false,
|
||||
error.DirNotEmpty => need_to_retry = true,
|
||||
else => |e| return e,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user