Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
core: fix usage of uv_cwd
Browse files Browse the repository at this point in the history
It was modified in libuv to be consistent with uv_exepath and not
include the trailing NULL byte in the returned size.

PR-URL: #8566
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
saghul authored and trevnorris committed Nov 6, 2014
1 parent a5f1307 commit e46cbaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ static void Cwd(const FunctionCallbackInfo<Value>& args) {
Local<String> cwd = String::NewFromUtf8(env->isolate(),
buf,
String::kNormalString,
cwd_len - 1);
cwd_len);
args.GetReturnValue().Set(cwd);
}

Expand Down

0 comments on commit e46cbaa

Please sign in to comment.