mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Check for subdirs in vfs loader exclusions.
The current logic used to transfer global_excludes into vfs exclusions only transfers global_excludes that are the parent of an item in dirs.include. This commit additionally adds an item from global_exclude to the vfs exclusions if the global_exclude is a child of an included item.
This commit is contained in:
parent
35db5e99f6
commit
96ee19851b
@ -455,7 +455,11 @@ impl ProjectFolders {
|
|||||||
dirs.include.extend(root.include);
|
dirs.include.extend(root.include);
|
||||||
dirs.exclude.extend(root.exclude);
|
dirs.exclude.extend(root.exclude);
|
||||||
for excl in global_excludes {
|
for excl in global_excludes {
|
||||||
if dirs.include.iter().any(|incl| incl.starts_with(excl)) {
|
if dirs
|
||||||
|
.include
|
||||||
|
.iter()
|
||||||
|
.any(|incl| incl.starts_with(excl) || excl.starts_with(incl))
|
||||||
|
{
|
||||||
dirs.exclude.push(excl.clone());
|
dirs.exclude.push(excl.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user