diff --git a/chownr.js b/chownr.js index ecd7b45..8112967 100644 --- a/chownr.js +++ b/chownr.js @@ -15,19 +15,12 @@ function chownr (p, uid, gid, cb) { , errState = null children.forEach(function (child) { var pathChild = path.resolve(p, child); - fs.lstat(pathChild, function(er, stats) { - if (er) - return cb(er) - if (!stats.isSymbolicLink()) - chownr(pathChild, uid, gid, then) - else - then() - }) + chownr(pathChild, uid, gid, then) }) function then (er) { if (errState) return if (er) return cb(errState = er) - if (-- len === 0) return fs.chown(p, uid, gid, cb) + if (-- len === 0) return fs.lchown(p, uid, gid, cb) } }) } diff --git a/package.json b/package.json index 6b31a60..582f172 100644 --- a/package.json +++ b/package.json @@ -19,5 +19,6 @@ "scripts": { "test": "tap test/*.js" }, - "license": "ISC" + "license": "ISC", + "engines": { "node" : ">=10.6.0" } }