windows: detect HANDLE_EOF in ReadFile
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…
Reference in New Issue