Skip to content

Commit 9ab12c4

Browse files
committed
skip scanning ignored content dirs
1 parent c80631d commit 9ab12c4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/oxide/src/scanner/detect_sources.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use crate::scanner::auto_source_detection::IGNORED_CONTENT_DIRS;
12
use crate::GlobEntry;
23
use fxhash::FxHashSet;
34
use globwalk::DirEntry;
@@ -101,6 +102,17 @@ pub fn resolve_globs(
101102
continue;
102103
}
103104

105+
if IGNORED_CONTENT_DIRS
106+
.iter()
107+
.any(|dir| match path.file_name() {
108+
Some(name) => name == *dir,
109+
None => false,
110+
})
111+
{
112+
it.skip_current_dir();
113+
continue;
114+
}
115+
104116
if !allowed_paths.contains(path) {
105117
continue;
106118
}

0 commit comments

Comments
 (0)