Skip to content
Merged
Prev Previous commit
Next Next commit
skip scanning ignored content dirs
  • Loading branch information
RobinMalfait committed Apr 3, 2025
commit 9ab12c406ca06db050656cf1ec449bdfe9f15106
12 changes: 12 additions & 0 deletions crates/oxide/src/scanner/detect_sources.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::scanner::auto_source_detection::IGNORED_CONTENT_DIRS;
use crate::GlobEntry;
use fxhash::FxHashSet;
use globwalk::DirEntry;
Expand Down Expand Up @@ -101,6 +102,17 @@ pub fn resolve_globs(
continue;
}

if IGNORED_CONTENT_DIRS
.iter()
.any(|dir| match path.file_name() {
Some(name) => name == *dir,
None => false,
})
{
it.skip_current_dir();
continue;
}

if !allowed_paths.contains(path) {
continue;
}
Expand Down