From 285a46d1ca4d8fe1fb7477b8fdbe1d9b377443c4 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 1 Aug 2012 01:42:36 +0200 Subject: [PATCH] uv: upgrade to 6209fe5 --- deps/uv/src/win/fs.c | 6 ++++-- deps/uv/src/win/process-stdio.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index 26ffb56b63e..4a2d93624d2 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -390,7 +390,7 @@ void fs__open(uv_fs_t* req) { DWORD access; DWORD share; DWORD disposition; - DWORD attributes; + DWORD attributes = 0; HANDLE file; int result, current_umask; int flags = req->file_flags; @@ -404,6 +404,7 @@ void fs__open(uv_fs_t* req) { switch (flags & (_O_RDONLY | _O_WRONLY | _O_RDWR)) { case _O_RDONLY: access = FILE_GENERIC_READ; + attributes |= FILE_FLAG_BACKUP_SEMANTICS; break; case _O_WRONLY: access = FILE_GENERIC_WRITE; @@ -419,6 +420,7 @@ void fs__open(uv_fs_t* req) { if (flags & _O_APPEND) { access &= ~FILE_WRITE_DATA; access |= FILE_APPEND_DATA; + attributes &= ~FILE_FLAG_BACKUP_SEMANTICS; } /* @@ -453,7 +455,7 @@ void fs__open(uv_fs_t* req) { goto end; } - attributes = FILE_ATTRIBUTE_NORMAL; + attributes |= FILE_ATTRIBUTE_NORMAL; if (flags & _O_CREAT) { if (!((req->mode & ~current_umask) & _S_IWRITE)) { attributes |= FILE_ATTRIBUTE_READONLY; diff --git a/deps/uv/src/win/process-stdio.c b/deps/uv/src/win/process-stdio.c index c98e2e47308..2fe2b232548 100644 --- a/deps/uv/src/win/process-stdio.c +++ b/deps/uv/src/win/process-stdio.c @@ -334,7 +334,7 @@ int uv__stdio_create(uv_loop_t* loop, uv_process_options_t* options, /* error. */ if (fdopt.data.fd <= 2 && loop->last_err.code == UV_EBADF) { CHILD_STDIO_CRT_FLAGS(buffer, i) = 0; - CHILD_STDIO_HANDLE(buffer, i) = NULL; + CHILD_STDIO_HANDLE(buffer, i) = INVALID_HANDLE_VALUE; break; } goto error;