mirror of
https://github.com/ziglang/zig.git
synced 2025-12-17 19:53:06 +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()) {
|
switch (kernel32.GetLastError()) {
|
||||||
.OPERATION_ABORTED => continue,
|
.OPERATION_ABORTED => continue,
|
||||||
.BROKEN_PIPE => return index,
|
.BROKEN_PIPE => return index,
|
||||||
|
.HANDLE_EOF => return index,
|
||||||
else => |err| return unexpectedError(err),
|
else => |err| return unexpectedError(err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user