diff options
author | Rebecca Turner <me@re-becca.org> | 2016-10-07 02:37:33 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-10-07 05:34:21 +0300 |
commit | 9402ead67e3be9b431ade637fbfac86204ee96fe (patch) | |
tree | b41c5e0bd9203d0ac77ad093527d525c32d700b3 /node_modules/glob/glob.js | |
parent | 13f7c0a73212284b53a2d96882fc298afbf9609c (diff) |
glob@7.1.0
Add absolute option for match event.
Credit: @phated
PR-URL: https://github.com/isaacs/node-glob/pull/293
Diffstat (limited to 'node_modules/glob/glob.js')
-rw-r--r-- | node_modules/glob/glob.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js index 9eca910bb..4078f468c 100644 --- a/node_modules/glob/glob.js +++ b/node_modules/glob/glob.js @@ -457,9 +457,6 @@ Glob.prototype._emitMatch = function (index, e) { if (this.aborted) return - if (this.matches[index][e]) - return - if (isIgnored(this, e)) return @@ -470,15 +467,21 @@ Glob.prototype._emitMatch = function (index, e) { var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + if (this.nodir) { var c = this.cache[abs] if (c === 'DIR' || Array.isArray(c)) return } - if (this.mark) - e = this._mark(e) - this.matches[index][e] = true var st = this.statCache[abs] |