authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2022-01-03 03:51:37-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-01-12 11:54:31-07:00
log2304dbaba414b037f14958fe4d456716b976985a
treedcebe511b2e4f7ccd93a1e8067e233ab363ccca7
parent675590cd44e4a01d7e0c1489b566a5bebc19b96b

Add CANNOT_DELETE as a possible error in os.windows.DeleteFile

Can happen when e.g. trying to delete a file with the Read Only flag set

1 files changed, 1 insertions(+), 0 deletions(-)

lib/std/os/windows.zig+1
......@@ -900,6 +900,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil
900900 .FILE_IS_A_DIRECTORY => return error.IsDir,
901901 .NOT_A_DIRECTORY => return error.NotDir,
902902 .SHARING_VIOLATION => return error.FileBusy,
903 .CANNOT_DELETE => return error.AccessDenied,
903904 else => return unexpectedStatus(rc),
904905 }
905906}