Permalink
Browse files

Remove unnecessary continuation separation

  • Loading branch information...
isaacs committed Mar 27, 2012
1 parent 15d2c69 commit 4ca6aa67c2ef60cec079720b1251cebdc63b29e9
Showing with 10 additions and 14 deletions.
  1. +10 −14 lib/cache.js
View
@@ -744,20 +744,16 @@ function addTmpTarball (tgz, name, cb) {
if (!cb) cb = name, name = ""
getCacheStat(function (er, cs) {
if (er) return cb(er)
- return addTmpTarball_(tgz, name, cs.uid, cs.gid, cb)
- })
-}
-
-function addTmpTarball_ (tgz, name, uid, gid, cb) {
- var contents = path.dirname(tgz)
- tar.unpack( tgz, path.resolve(contents, "package")
- , null, null
- , uid, gid
- , function (er) {
- if (er) {
- return cb(er)
- }
- addLocalDirectory(path.resolve(contents, "package"), name, cb)
+ var contents = path.dirname(tgz)
+ tar.unpack( tgz, path.resolve(contents, "package")
+ , null, null
+ , cs.uid, cs.gid
+ , function (er) {
+ if (er) {
+ return cb(er)
+ }
+ addLocalDirectory(path.resolve(contents, "package"), name, cb)
+ })
})
}

0 comments on commit 4ca6aa6

Please sign in to comment.