diff options
author | isaacs <i@izs.me> | 2011-06-22 03:10:16 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-06-22 03:10:16 +0400 |
commit | ca8d8c489aab44f91b97b353cb5505de225e9344 (patch) | |
tree | 4533707ea6d53b8e53aadbefda0bcd7c22149feb | |
parent | 9a343356d606eb72e088b86c572ec0badc6eb295 (diff) |
Enable including a file in a dir that is not included
-rw-r--r-- | lib/utils/tar.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/utils/tar.js b/lib/utils/tar.js index 12b4de3e6..2d2a7ac11 100644 --- a/lib/utils/tar.js +++ b/lib/utils/tar.js @@ -474,11 +474,14 @@ function makeList_ (dir, pkg, exList, dfc, cb) { && dfc) { // do fancy crap files = filterNodeModules(files, pkg) } else { - // FIXME If a directory is excluded, we still need to be + // If a directory is excluded, we still need to be // able to *include* a file within it, and have that override // the prior exclusion. + // // This whole makeList thing probably needs to be rewritten - files = files.filter(excludes.filter(dir, exList)) + files = files.filter(function (f) { + return excludes.filter(dir, exList)(f) || f.slice(-1) === "/" + }) } @@ -494,6 +497,7 @@ function makeList_ (dir, pkg, exList, dfc, cb) { return cb(null, file) }) }, function (er, files, c) { + //log.warn(files, "files") if (c) cleanup = (cleanup || []).concat(c) return cb(er, files, cleanup) }) |