Follow symlinks when walking project trees

Fixes #3691
This commit is contained in:
Daniel Fox Franke 2020-10-15 14:22:36 -04:00
parent 84d6cdef86
commit e821aa842b

View File

@ -165,14 +165,15 @@ fn load_entry(
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();