We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b22101 commit fa80ba6Copy full SHA for fa80ba6
lib/DirectoryWatcher.js
@@ -653,12 +653,6 @@ class DirectoryWatcher extends EventEmitter {
653
true,
654
"scan (file)"
655
);
656
- if (
657
- this.watcherManager.options.followSymlinks &&
658
- stats.isSymbolicLink()
659
- ) {
660
- fs.stat(itemPath, handleStats);
661
- }
662
} else if (stats.isDirectory()) {
663
if (!initial || !this.directories.has(itemPath))
664
this.setDirectory(
@@ -670,7 +664,11 @@ class DirectoryWatcher extends EventEmitter {
670
}
671
665
itemFinished();
672
666
};
673
- fs.lstat(itemPath, handleStats);
667
+ if (this.watcherManager.options.followSymlinks) {
668
+ fs.stat(itemPath, handleStats);
669
+ } else {
+ fs.lstat(itemPath, handleStats);
+ }
674
675
676
});
0 commit comments