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 22:03:14-08:00
log8f8aa8346a8babe43fb85d7033db2a329d602366
tree3eb63389886f6b9a6df55a0a5494727445c9bac2
parent4dd7fe90a2b541a44aafc3a9596445387a3aed49

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,