We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Directories::contains_file
1 parent 7ee6cca commit ae1288eCopy full SHA for ae1288e
crates/vfs/src/loader.rs
@@ -137,7 +137,10 @@ impl Directories {
137
/// Returns `true` if `path` is included in `self`.
138
pub fn contains_file(&self, path: &AbsPath) -> bool {
139
let ext = path.extension().unwrap_or_default();
140
- self.extensions.iter().any(|it| it.as_str() == ext) && self.includes_path(path)
+ if self.extensions.iter().all(|it| it.as_str() != ext) {
141
+ return false;
142
+ }
143
+ self.includes_path(path)
144
}
145
146
0 commit comments