Browse Source

First arg to fs.fchown is an int, not a string

Bug introduced by 26bfb6bea4

Fix isaacs/npm#2225
v0.9.1-release
isaacs 13 years ago
parent
commit
4053c01b53
  1. 4
      src/node_file.cc

4
src/node_file.cc

@ -875,10 +875,10 @@ static Handle<Value> FChown(const Arguments& args) {
HandleScope scope;
int len = args.Length();
if (len < 1) return TYPE_ERROR("path required");
if (len < 1) return TYPE_ERROR("fd required");
if (len < 2) return TYPE_ERROR("uid required");
if (len < 3) return TYPE_ERROR("gid required");
if (!args[0]->IsString()) return TYPE_ERROR("path must be a string");
if (!args[0]->IsInt32()) return TYPE_ERROR("fd must be an int");
if (!args[1]->IsInt32()) return TYPE_ERROR("uid must be an int");
if (!args[2]->IsInt32()) return TYPE_ERROR("gid must be an int");

Loading…
Cancel
Save