Skip to content

Commit

Permalink
src: accommodate uv_cwd including null on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
tjfontaine committed Mar 11, 2014
1 parent 0c2e28d commit 7d6b8db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7d6b8db

Please sign in to comment.