Skip to content

Commit

Permalink
early repeat scan
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jan 9, 2019
1 parent e8a0f72 commit 3edd5c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/DirectoryWatcher.js
Expand Up @@ -502,6 +502,12 @@ class DirectoryWatcher extends EventEmitter {
this.setMissing(file, initial, "scan (missing)");
}
}
if(this.scanAgain) {
// Early repeat of scan
this.scanAgain = false;
this.doScan(initial);
return;
}
async.forEach(itemPaths, (itemPath, callback) => {
fs.stat(itemPath, (err2, stats) => {
if(this.closed) return;
Expand Down

0 comments on commit 3edd5c5

Please sign in to comment.