main: when loading morphism base, remove . from path suffix variable
This commit is contained in:
parent
ea2504ff07
commit
692a34c257
1 changed files with 5 additions and 2 deletions
|
@ -37,7 +37,7 @@ fn main() {
|
|||
|
||||
// 1.1. pfade ermitteln
|
||||
let env_var = "MORPHISM_BASE";
|
||||
let suffix = ".morphism-base";
|
||||
let suffix = "morphism-base";
|
||||
|
||||
match std::env::var(env_var) {
|
||||
Ok(path_str) => {
|
||||
|
@ -46,7 +46,10 @@ fn main() {
|
|||
for entry in WalkDir::new(path)
|
||||
.into_iter()
|
||||
.filter_map(Result::ok)
|
||||
.filter(|e| e.path().is_file() && e.path().extension().map_or(false, |ext| ext == &suffix[1..]))
|
||||
.filter(|e|
|
||||
e.path().is_file() &&
|
||||
e.path().extension().map_or(false, |ext| ext == suffix)
|
||||
)
|
||||
{
|
||||
mb_paths.push(entry.path().into());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue