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
This commit is contained in:
Ryan Liptak
2022-01-03 03:51:37 -08:00
committed by Andrew Kelley
parent 675590cd44
commit 2304dbaba4

View File

@@ -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),
}
}