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

Commit

Permalink
Browse files Browse the repository at this point in the history
First arg to fs.fchown is an int, not a string
Bug introduced by 26bfb6b

Fix isaacs/npm#2225
  • Loading branch information
isaacs committed Mar 3, 2012
1 parent 61be684 commit 4053c01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_file.cc
Expand Up @@ -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");

Expand Down

0 comments on commit 4053c01

Please sign in to comment.