mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 03:03:09 +00:00
windows: detect HANDLE_EOF in ReadFile
This commit is contained in:
parent
3657a54618
commit
06d2f53ece
@ -407,6 +407,7 @@ pub fn ReadFile(in_hFile: HANDLE, buffer: []u8, offset: ?u64) ReadFileError!usiz
|
||||
switch (kernel32.GetLastError()) {
|
||||
.OPERATION_ABORTED => continue,
|
||||
.BROKEN_PIPE => return index,
|
||||
.HANDLE_EOF => return index,
|
||||
else => |err| return unexpectedError(err),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user