diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index 94da291930..9c112b80d2 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -294,6 +294,7 @@ void fs__read(uv_fs_t* req, uv_file file, void *buf, size_t length, OVERLAPPED overlapped, *overlapped_ptr; LARGE_INTEGER offset_; DWORD bytes; + DWORD error; VERIFY_UV_FILE(file, req); @@ -323,7 +324,12 @@ void fs__read(uv_fs_t* req, uv_file file, void *buf, size_t length, if (ReadFile(handle, buf, length, &bytes, overlapped_ptr)) { SET_REQ_RESULT(req, bytes); } else { - SET_REQ_WIN32_ERROR(req, GetLastError()); + error = GetLastError(); + if (error == ERROR_HANDLE_EOF) { + SET_REQ_RESULT(req, bytes); + } else { + SET_REQ_WIN32_ERROR(req, error); + } } } diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c index 0fcfb9c3d2..40bea97ef0 100644 --- a/deps/uv/src/win/util.c +++ b/deps/uv/src/win/util.c @@ -253,6 +253,7 @@ void uv_filetime_to_time_t(FILETIME* file_time, time_t* stat_time) { time.tm_hour = system_time.wHour; time.tm_min = system_time.wMinute; time.tm_sec = system_time.wSecond; + time.tm_isdst = -1; *stat_time = mktime(&time); } else {