From 3febb13a46483872ebf9e51eabadc6e35576125a Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Mon, 3 Jan 2022 03:51:37 -0800 Subject: [PATCH] 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 --- lib/std/os/windows.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 59e65ed54c18..6b4ef5c1188f 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -900,6 +900,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil .FILE_IS_A_DIRECTORY => return error.IsDir, .NOT_A_DIRECTORY => return error.NotDir, .SHARING_VIOLATION => return error.FileBusy, + .CANNOT_DELETE => return error.AccessDenied, else => return unexpectedStatus(rc), } }