diff options
author | Daniel Fox Franke <[email protected]> | 2020-10-15 19:22:36 +0100 |
---|---|---|
committer | Daniel Fox Franke <[email protected]> | 2020-10-15 19:22:36 +0100 |
commit | e821aa842bd3f8beeda6b0c9f18db87af0de8adc (patch) | |
tree | 4f0f3bde2b4e2f67f1738567f959b6b2db13277a /crates/vfs-notify | |
parent | 84d6cdef86dfe1054ecafaedfddbf90a2b3a469d (diff) |
Follow symlinks when walking project trees
Fixes #3691
Diffstat (limited to 'crates/vfs-notify')
-rw-r--r-- | crates/vfs-notify/src/lib.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index e1e36612a..c605bcf3c 100644 --- a/crates/vfs-notify/src/lib.rs +++ b/crates/vfs-notify/src/lib.rs | |||
@@ -165,14 +165,15 @@ impl NotifyActor { | |||
165 | let mut res = Vec::new(); | 165 | let mut res = Vec::new(); |
166 | 166 | ||
167 | for root in dirs.include.iter() { | 167 | for root in dirs.include.iter() { |
168 | let walkdir = WalkDir::new(root).into_iter().filter_entry(|entry| { | 168 | let walkdir = |
169 | if !entry.file_type().is_dir() { | 169 | WalkDir::new(root).follow_links(true).into_iter().filter_entry(|entry| { |
170 | return true; | 170 | if !entry.file_type().is_dir() { |
171 | } | 171 | return true; |
172 | let path = AbsPath::assert(entry.path()); | 172 | } |
173 | root == path | 173 | let path = AbsPath::assert(entry.path()); |
174 | || dirs.exclude.iter().chain(&dirs.include).all(|it| it != path) | 174 | root == path |
175 | }); | 175 | || dirs.exclude.iter().chain(&dirs.include).all(|it| it != path) |
176 | }); | ||
176 | 177 | ||
177 | let files = walkdir.filter_map(|it| it.ok()).filter_map(|entry| { | 178 | let files = walkdir.filter_map(|it| it.ok()).filter_map(|entry| { |
178 | let is_dir = entry.file_type().is_dir(); | 179 | let is_dir = entry.file_type().is_dir(); |