Skip to content

Commit

Permalink
Merge af17009 into 8cd5f7a
Browse files Browse the repository at this point in the history
  • Loading branch information
eGavr committed Jul 14, 2018
2 parents 8cd5f7a + af17009 commit 6062afd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ FSWatcher.prototype._isIgnored = function(path, stats) {
var replacerRe = /^\.[\/\\]/;
FSWatcher.prototype._getWatchHelpers = function(path, depth) {
path = path.replace(replacerRe, '');
var watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
var getExistingPath = function(path) { return fs.existsSync(path) ? path : getExistingPath(sysPath.dirname(path)); };
var watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : getExistingPath(globParent(path));
var fullWatchPath = sysPath.resolve(watchPath);
var hasGlob = watchPath !== path;
var globFilter = hasGlob ? anymatch(path) : false;
Expand Down

0 comments on commit 6062afd

Please sign in to comment.