Skip to content

Commit 7d6b8db

Browse files
committed
src: accommodate uv_cwd including null on win32
1 parent 0c2e28d commit 7d6b8db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/node.cc

+6
Original file line numberDiff line numberDiff line change
@@ -1552,6 +1552,12 @@ static void Cwd(const FunctionCallbackInfo<Value>& args) {
15521552
return env->ThrowUVException(err, "uv_cwd");
15531553
}
15541554

1555+
#ifdef _WIN32
1556+
// TODO(tjfontaine) in the future libuv will report the size include the null
1557+
// for now only windows does, remove conditionals after libuv upgrade
1558+
cwd_len -= 1;
1559+
#endif
1560+
15551561
Local<String> cwd = String::NewFromUtf8(env->isolate(),
15561562
buf,
15571563
String::kNormalString,

0 commit comments

Comments
 (0)