zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3c87d4e14ec6b0c2442372cbcc60174d654edddc (tree)
parent 5b0be0d436407bbb7a9c6445b6bc58347add301e
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:
Mlib/std/os/windows.zig | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig @@ -913,6 +913,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), } }