File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,8 @@ class _LinuxDirectoryWatcher
239239
240240 /// Emits [ChangeType.ADD] events for the recursive contents of [path] .
241241 void _addSubdir (String path) {
242- _listen (Directory (path).list (recursive: true ), (FileSystemEntity entity) {
242+ _listen (Directory (path).list (recursive: true , followLinks: false ),
243+ (FileSystemEntity entity) {
243244 if (entity is Directory ) {
244245 _watchSubdir (entity.path);
245246 } else {
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ class _MacOSDirectoryWatcher
149149 if (_files.containsDir (path)) continue ;
150150
151151 var stream = Directory (path)
152- .list (recursive: true )
152+ .list (recursive: true , followLinks : false )
153153 .ignoring <PathNotFoundException >();
154154 var subscription = stream.listen ((entity) {
155155 if (entity is Directory ) return ;
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ class _WindowsDirectoryWatcher
217217 // itself, so there are no other types of "path not found" that
218218 // might need different handling here.
219219 var stream = Directory (path)
220- .list (recursive: true )
220+ .list (recursive: true , followLinks : false )
221221 .ignoring <PathNotFoundException >();
222222 var subscription = stream.listen ((entity) {
223223 if (entity is Directory ) return ;
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ extension DirectoryRobustRecursiveListing on Directory {
7979 ///
8080 /// Theses can arise from concurrent file-system modification.
8181 Stream <FileSystemEntity > listRecursivelyIgnoringErrors () {
82- return list (recursive: true )
82+ return list (recursive: true , followLinks : false )
8383 .ignoring <PathNotFoundException >()
8484 .ignoring <PathAccessException >();
8585 }
You can’t perform that action at this time.
0 commit comments