commit 2304dbaba414b037f14958fe4d456716b976985a (tree)
parent 675590cd44e4a01d7e0c1489b566a5bebc19b96b
Author: Ryan Liptak <squeek502@hotmail.com>
Date: Mon, 3 Jan 2022 03:51:37 -0800
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
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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),
}
}