diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-09-19 10:19:25 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-09-19 10:19:25 +0400 |
commit | 1259d85d78405b4c48becba8dcec6d8adf1bc3f6 (patch) | |
tree | 0c9dcec71104751c05219a682328d7a6b4cf9534 /lib/cache.js | |
parent | 17c941a2d583210fe97ed47e2968d94ce9f774ba (diff) |
reintroduce omitted chown (thx iarna!)
Diffstat (limited to 'lib/cache.js')
-rw-r--r-- | lib/cache.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/cache.js b/lib/cache.js index 50324f9d5..0c6264c32 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -352,8 +352,11 @@ function afterAdd (cb) { return function (er, data) { if (!done) return undefined - writeFileAtomic(pj, JSON.stringify(data), function (er) { - return done(er, data) + getStat(function (er, cs) { + if (er) return done(er) + writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) { + return done(er, data) + }) }) }} |