Skip to content

Commit

Permalink
Track existing dirs even when ignoreInitial=true
Browse files Browse the repository at this point in the history
Resolves gh-238
  • Loading branch information
es128 committed Mar 3, 2015
1 parent 765f7bd commit afdce4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/nodefs-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ NodeFsHandler.prototype._handleDir =
function(dir, stats, initialAdd, depth, target, wh, callback) {
if (!(initialAdd && this.options.ignoreInitial) && !target && !wh.hasGlob) {
this._emit('addDir', dir, stats);
} else {
this._getWatchedDir(sysPath.dirname(dir)).add(sysPath.basename(dir));
}

var read = function(directory, initialAdd, done) {
Expand Down

0 comments on commit afdce4f

Please sign in to comment.