aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2a098ee..508eeec 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -108,12 +108,12 @@ pub fn load_model_entry(p: &Path) -> Result<ModelEntry,String> {
})
}
-// TODO: have this check for model.modelica etc
pub fn search_models(p: &Path) -> Vec<String> {
if fs::metadata(p).unwrap().is_dir() {
fs::read_dir(p).unwrap()
.map(|x| x.unwrap())
.filter(|x| x.metadata().unwrap().is_dir())
+ .filter(|x| x.path().join("model.modelica").exists())
.map(|x| x.path().to_string_lossy().to_string())
.collect()
} else {