mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-27 07:03:45 +00:00
Merge #6246
6246: Follow symlinks when walking project trees r=lnicola a=dfoxfranke Fixes #3691. ~~WIP pending further testing~~: - [X] Verify that symlinked files get indexed. - [x] Verify that files in symlinked directories get indexed. - [x] Verify that inotify events are properly received and handled when the target of a symlink resides outside the project tree. Co-authored-by: Daniel Fox Franke <dfoxfranke@gmail.com>
This commit is contained in:
commit
1af6275f20
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user