Skip to content

Commit 3b12542

Browse files
committed
apparantly stat isn't needed in doScan at all
1 parent 5b22101 commit 3b12542

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/DirectoryWatcher.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ class DirectoryWatcher extends EventEmitter {
626626
}
627627
});
628628
for (const itemPath of itemPaths) {
629-
const handleStats = (err2, stats) => {
629+
fs.stat(itemPath, (err2, stats) => {
630630
if (this.closed) return;
631631
if (err2) {
632632
if (
@@ -653,12 +653,6 @@ class DirectoryWatcher extends EventEmitter {
653653
true,
654654
"scan (file)"
655655
);
656-
if (
657-
this.watcherManager.options.followSymlinks &&
658-
stats.isSymbolicLink()
659-
) {
660-
fs.stat(itemPath, handleStats);
661-
}
662656
} else if (stats.isDirectory()) {
663657
if (!initial || !this.directories.has(itemPath))
664658
this.setDirectory(
@@ -669,8 +663,7 @@ class DirectoryWatcher extends EventEmitter {
669663
);
670664
}
671665
itemFinished();
672-
};
673-
fs.lstat(itemPath, handleStats);
666+
});
674667
}
675668
itemFinished();
676669
});

0 commit comments

Comments
 (0)