Skip to content

Commit

Permalink
Merge pull request #17 from trevan/master
Browse files Browse the repository at this point in the history
Handle files that are deleted and recreated
  • Loading branch information
sokra committed May 6, 2016
2 parents 50ea369 + 92b1d6a commit f32a643
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/DirectoryWatcher.js
Expand Up @@ -102,6 +102,7 @@ DirectoryWatcher.prototype.setFileTime = function setFileTime(filePath, mtime, i
});
}
} else if(!initial && !mtime) {
delete this.files[filePath];
if(this.watchers[withoutCase(filePath)]) {
this.watchers[withoutCase(filePath)].forEach(function(w) {
w.emit("remove");
Expand Down

0 comments on commit f32a643

Please sign in to comment.