From e821aa842bd3f8beeda6b0c9f18db87af0de8adc Mon Sep 17 00:00:00 2001 From: Daniel Fox Franke Date: Thu, 15 Oct 2020 14:22:36 -0400 Subject: [PATCH] Follow symlinks when walking project trees Fixes #3691 --- crates/vfs-notify/src/lib.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index e1e36612a6..c605bcf3c8 100644 --- a/crates/vfs-notify/src/lib.rs +++ b/crates/vfs-notify/src/lib.rs @@ -165,14 +165,15 @@ impl NotifyActor { let mut res = Vec::new(); for root in dirs.include.iter() { - let walkdir = WalkDir::new(root).into_iter().filter_entry(|entry| { - if !entry.file_type().is_dir() { - return true; - } - let path = AbsPath::assert(entry.path()); - root == path - || dirs.exclude.iter().chain(&dirs.include).all(|it| it != path) - }); + let walkdir = + WalkDir::new(root).follow_links(true).into_iter().filter_entry(|entry| { + if !entry.file_type().is_dir() { + return true; + } + let path = AbsPath::assert(entry.path()); + root == path + || dirs.exclude.iter().chain(&dirs.include).all(|it| it != path) + }); let files = walkdir.filter_map(|it| it.ok()).filter_map(|entry| { let is_dir = entry.file_type().is_dir();