Skip to content

Commit

Permalink
Ignore readdirp errors
Browse files Browse the repository at this point in the history
When readdirp is processing a directory and a file/directory is removed
just before readdirp calls (l)stat on it, it gives an 'error'. It's
safer to ignore it.
  • Loading branch information
nono committed Jun 1, 2016
1 parent 9198dd0 commit 997305f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/fsevents-handler.js
Expand Up @@ -363,7 +363,9 @@ function(path, transform, forceAdd, priorDepth) {
} else {
emitAdd(joinedPath, entry.stat);
}
}.bind(this)).on('end', this._emitReady);
}.bind(this)).on('error', function() {
// Ignore readdirp errors
}).on('end', this._emitReady);
} else {
emitAdd(wh.watchPath, stats);
this._emitReady();
Expand Down

0 comments on commit 997305f

Please sign in to comment.