diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-02-20 19:16:42 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-02-20 19:16:42 +0300 |
commit | 0fe0caa7eddb7acdacbe5ee81ceabaca27175c78 (patch) | |
tree | 0ef2efcd11cb37fef5fa9ba7af8a56f00092b00e /node_modules/glob/glob.js | |
parent | aa791942a9f3c8af6a650edec72a675deb7a7c6e (diff) |
glob@4.4.0
Adds ignoring matches.
Diffstat (limited to 'node_modules/glob/glob.js')
-rw-r--r-- | node_modules/glob/glob.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js index 7401e0b7e..0075c1fb8 100644 --- a/node_modules/glob/glob.js +++ b/node_modules/glob/glob.js @@ -56,6 +56,7 @@ var setopts = common.setopts var ownProp = common.ownProp var inflight = require('inflight') var util = require('util') +var childrenIgnored = common.childrenIgnored var once = require('once') @@ -270,6 +271,10 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) { var abs = this._makeAbs(read) + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + var isGlobStar = remain[0] === minimatch.GLOBSTAR if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) @@ -277,7 +282,6 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) { this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) } - Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { var self = this this._readdir(abs, inGlobStar, function (er, entries) { |