From 7d6b8db40f32e817ff145b7cfe6b3aec3179fba7 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Tue, 11 Mar 2014 14:49:48 -0700 Subject: [PATCH] src: accommodate uv_cwd including null on win32 --- src/node.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/node.cc b/src/node.cc index 6c7eaf3d2d..0acdd22ad3 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1552,6 +1552,12 @@ static void Cwd(const FunctionCallbackInfo& args) { return env->ThrowUVException(err, "uv_cwd"); } +#ifdef _WIN32 + // TODO(tjfontaine) in the future libuv will report the size include the null + // for now only windows does, remove conditionals after libuv upgrade + cwd_len -= 1; +#endif + Local cwd = String::NewFromUtf8(env->isolate(), buf, String::kNormalString,