Skip to content

Commit

Permalink
fix windows codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Mar 10, 2024
1 parent 5e3fd53 commit 58f601c
Show file tree
Hide file tree
Showing 18 changed files with 33,341 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/codegen/src/create_icon_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ fn collect_svg_files(svg_path: &str, icon_prefix: &str) -> Vec<PathBuf> {
return re.is_match(e.path().to_str().unwrap());
}
"Md" => {
let path_str = e.path().as_os_str().to_str().unwrap();
let split_vec = path_str.split('/').collect::<Vec<_>>();
return split_vec.contains(&"materialicons")
let split_vec = e.path().components().collect::<Vec<_>>();
return split_vec.iter().any(|c| c.as_os_str() == "materialicons")
&& e.file_name().to_str().unwrap() == "24px.svg";
}
_ => return e.path().extension() == Some(OsStr::new("svg")),
Expand Down
Loading

0 comments on commit 58f601c

Please sign in to comment.