mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 16:24:51 +00:00
windows: Handle DELETE_PENDING in DeleteFile.
DELETE_PENDING can happen when the file is yet to be closed for deletion or if it never get closed. In that case, DeleteFile should assume the file deletion is succeeding (no CloseHandle is required as it's a "failure"). In case of `DELETE_PENDING` failure, the file may still exist. In which case if it's part of `deleteTree`, it will eventually fail on `error.DirNotEmpty`.
This commit is contained in:
parent
55b2456c11
commit
8c79559748
@ -934,6 +934,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil
|
||||
.NOT_A_DIRECTORY => return error.NotDir,
|
||||
.SHARING_VIOLATION => return error.FileBusy,
|
||||
.ACCESS_DENIED => return error.AccessDenied,
|
||||
.DELETE_PENDING => return,
|
||||
else => return unexpectedStatus(rc),
|
||||
}
|
||||
var file_dispo = FILE_DISPOSITION_INFORMATION{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user