summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2014-03-11 14:49:48 -0700
committerTimothy J Fontaine <tjfontaine@gmail.com>2014-03-11 14:49:48 -0700
commit7d6b8db40f32e817ff145b7cfe6b3aec3179fba7 (patch)
tree69dc15f15874dfb6492627f6540a49972eb3f7be /src
parent0c2e28d68ff0f0bb40fcc392a031021d4815680e (diff)
downloadandroid-node-v8-7d6b8db40f32e817ff145b7cfe6b3aec3179fba7.tar.gz
android-node-v8-7d6b8db40f32e817ff145b7cfe6b3aec3179fba7.tar.bz2
android-node-v8-7d6b8db40f32e817ff145b7cfe6b3aec3179fba7.zip
src: accommodate uv_cwd including null on win32
Diffstat (limited to 'src')
-rw-r--r--src/node.cc6
1 files changed, 6 insertions, 0 deletions
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<Value>& 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<String> cwd = String::NewFromUtf8(env->isolate(),
buf,
String::kNormalString,