authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-29 13:31:44-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-30 12:10:02-08:00
log4e198dc1872253533a63468668d9b49a4a9d31dd
treea44c94be7ff31d280bdee13fb43ad3b38242f789
parent816f70d0c3ba55d0b9cffcc7474ad595c1676d43

std.Io.Threaded: ntReadFileResult handles EOF + bytes available


1 files changed, 4 insertions(+), 2 deletions(-)

lib/std/Io/Threaded.zig+4-2
...@@ -8709,8 +8709,10 @@ fn ntReadFileResult(io_status_block: *const windows.IO_STATUS_BLOCK) !usize {...@@ -8709,8 +8709,10 @@ fn ntReadFileResult(io_status_block: *const windows.IO_STATUS_BLOCK) !usize {
8709 .PENDING => unreachable,8709 .PENDING => unreachable,
8710 .CANCELLED => unreachable,8710 .CANCELLED => unreachable,
8711 .SUCCESS => return io_status_block.Information,8711 .SUCCESS => return io_status_block.Information,
8712 .END_OF_FILE => return error.EndOfStream,8712 .END_OF_FILE, .PIPE_BROKEN => {
8713 .PIPE_BROKEN => return error.EndOfStream,8713 if (io_status_block.Information == 0) return error.EndOfStream;
8714 return io_status_block.Information;
8715 },
8714 .INVALID_DEVICE_REQUEST => return error.IsDir,8716 .INVALID_DEVICE_REQUEST => return error.IsDir,
8715 .LOCK_NOT_GRANTED => return error.LockViolation,8717 .LOCK_NOT_GRANTED => return error.LockViolation,
8716 .ACCESS_DENIED => return error.AccessDenied,8718 .ACCESS_DENIED => return error.AccessDenied,