diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index c93feb20d74250d71cae4d95b2e3b8e89db78af8..2f2369a458616121ca60bd723b6ce9d618b6c5a9 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -469,6 +469,7 @@ pub const WriteFileError = error{ SystemResources, OperationAborted, BrokenPipe, + NotOpenForWriting, Unexpected, }; @@ -542,6 +543,7 @@ pub fn WriteFile( .NOT_ENOUGH_QUOTA => return error.SystemResources, .IO_PENDING => unreachable, .BROKEN_PIPE => return error.BrokenPipe, + .INVALID_HANDLE => return error.NotOpenForWriting, else => |err| return unexpectedError(err), } }