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:
ammkrn 2021-05-25 10:07:01 -05:00
parent 35db5e99f6
commit 96ee19851b

View File

@ -455,7 +455,11 @@ impl ProjectFolders {
dirs.include.extend(root.include);
dirs.exclude.extend(root.exclude);
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());
}
}