diff options
author | isaacs <i@izs.me> | 2011-10-12 21:46:03 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-10-12 21:46:03 +0400 |
commit | c1a38a0d5f6d64c9373bb1c971ee0a28def6221c (patch) | |
tree | e16ac8d1dc41a4e37add1ab68ac30f8fb0d93152 /lib | |
parent | 9fa5ca2b66a9923564d8a4ff8c2381d84587560b (diff) |
close #1542 don't chown if uid/gid aren't numbers
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cache.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/cache.js b/lib/cache.js index dc4d0def2..6cf188c30 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -603,7 +603,9 @@ function addPlacedTarball_ (p, name, uid, gid, cb) { log.verbose(FMODE.toString(8), "chmod "+f) fs.chmod(f, FMODE, cb) }, function (f, cb) { - fs.chown(f, uid, gid, cb) + if (typeof uid === "number" && typeof gid === "number") { + fs.chown(f, uid, gid, cb) + } else cb() }, function (er) { cb(er, data) }) |