Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
mkdir: A few more places where the noChmod wasn't set
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Oct 21, 2011
1 parent 19bbc78 commit 8bd5c1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/utils/mkdir-p.js
Expand Up @@ -78,12 +78,12 @@ function done (ensure, mode, uid, gid, noChmod, cb) {
log.verbose("done: "+ensure+" "+mode.toString(8), "mkdir")

// only chmod if noChmod isn't set.
var d = done_(ensure, mode, uid, gid, noChmod, cb)
var d = done_(ensure, mode, uid, gid, cb)
if (noChmod) return d()
fs.chmod(ensure, mode, d)
}

function done_ (ensure, mode, uid, gid, noChmod, cb) {
function done_ (ensure, mode, uid, gid, cb) {
return function (er) {
if (er
|| ensure === npm.dir
Expand All @@ -97,7 +97,7 @@ function done_ (ensure, mode, uid, gid, noChmod, cb) {
}

var pathSplit = process.platform === "win32" ? /\/|\\/ : "/"
function walkDirs (ensure, mode, uid, gid, cb) {
function walkDirs (ensure, mode, uid, gid, noChmod, cb) {
var dirs = ensure.split(pathSplit)
, walker = []
, foundUID = null
Expand All @@ -111,7 +111,7 @@ function walkDirs (ensure, mode, uid, gid, cb) {
// no more directory steps left.
if (d === undefined) {
// do the chown stuff
return done(ensure, mode, uid, gid, cb)
return done(ensure, mode, uid, gid, noChmod, cb)
}

// get the absolute dir for the next piece being stat'd
Expand Down

0 comments on commit 8bd5c1f

Please sign in to comment.