Don't die when arguments are passed to process.cwd()

This commit is contained in:
Bert Belder 2011-11-24 02:19:54 +01:00
parent 16889e22cc
commit cbcf4fe768

View File

@ -1163,9 +1163,9 @@ static Handle<Value> Chdir(const Arguments& args) {
return Undefined();
}
static Handle<Value> Cwd(const Arguments& args) {
HandleScope scope;
assert(args.Length() == 0);
char *r = getcwd(getbuf, ARRAY_SIZE(getbuf) - 1);
if (r == NULL) {