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/sync.js | |
parent | aa791942a9f3c8af6a650edec72a675deb7a7c6e (diff) |
glob@4.4.0
Adds ignoring matches.
Diffstat (limited to 'node_modules/glob/sync.js')
-rw-r--r-- | node_modules/glob/sync.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js index f981055af..686f2c369 100644 --- a/node_modules/glob/sync.js +++ b/node_modules/glob/sync.js @@ -14,6 +14,7 @@ var alphasorti = common.alphasorti var isAbsolute = common.isAbsolute var setopts = common.setopts var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored function globSync (pattern, options) { if (typeof options === 'function' || arguments.length === 3) @@ -98,6 +99,10 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) { var abs = this._makeAbs(read) + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + var isGlobStar = remain[0] === minimatch.GLOBSTAR if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) @@ -105,6 +110,7 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) { this._processReaddir(prefix, read, abs, remain, index, inGlobStar) } + GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { var entries = this._readdir(abs, inGlobStar) |