More lenient file path matchers

This commit is contained in:
Kirill Bulatov 2023-11-14 00:19:51 +02:00
parent b8be720490
commit 1612c90052
3 changed files with 24 additions and 3 deletions

View file

@ -12,7 +12,6 @@ pub struct ProjectSettings {
pub git: GitSettings,
// TODO kb better names and docs and tests
// TODO kb how to react on their changes?
// TODO kb /something/node_modules/ does not match `"**/node_modules/**"` glob!!!
#[serde(default)]
pub scan_exclude_files: Vec<String>,
}

View file

@ -3598,7 +3598,7 @@ impl BackgroundScanner {
for entry in &mut new_entries {
state.reuse_entry_id(entry);
if entry.is_dir() {
if state.should_scan_directory(&entry, &job.path.join(&entry.path)) {
if state.should_scan_directory(&entry, &root_abs_path.join(&entry.path)) {
job_ix += 1;
} else {
log::debug!("defer scanning directory {:?}", entry.path);