summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <saghul@gmail.com>2014-03-13 00:22:50 +0100
committerFedor Indutny <fedor@indutny.com>2014-04-07 16:37:29 +0400
commita0a180a0adba6be3c567cd89e4bbca3561893e0d (patch)
tree8b6487c7b97a1fd05e4eb78fdf58e3cdfc619ca2
parent42b93437102e63ded3e09bbeb24dc96d5b1b62f6 (diff)
downloadnode-a0a180a0adba6be3c567cd89e4bbca3561893e0d.tar.gz
src: fix use of uv_cwd, len includes the NULL byte
-rw-r--r--src/node.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/node.cc b/src/node.cc
index da7c2bcf1..37756e0ba 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -1598,16 +1598,10 @@ 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,
- cwd_len);
+ cwd_len - 1);
args.GetReturnValue().Set(cwd);
}