From 70a393ea9ab34dfaedbe0a285dcf3e5c4a4c5f03 Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Mon, 27 Feb 2012 13:16:06 -0800 Subject: [PATCH] update libuv to 9a5c1bad90 --- deps/uv/src/win/fs.c | 8 +++++++- deps/uv/src/win/util.c | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) 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 {