Skip to content

Commit

Permalink
Merge pull request #5 from chozandrias76/add-local-changes-for-path-s…
Browse files Browse the repository at this point in the history
…plitting

fix: add additional extension splitting from path
  • Loading branch information
ClayAmore authored Mar 25, 2024
2 parents 4325857 + 6ec205a commit 922f83d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/regulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Regulation {
let mut params: HashMap<Param, Vec<u8>> = HashMap::new();

for file in &res.files {
let file_name = path.file_stem().unwrap().to_str().unwrap().split("\\").last().expect("Could not find content at end of path");
let file_name = &file.name.split("\\").last().expect("Could not locate file name").split(".").nth(0).expect("Could not locate file name without extension");
let param_type = Param::from_str(file_name)?;
params.insert(param_type, file.bytes.to_vec());
}
Expand Down

0 comments on commit 922f83d

Please sign in to comment.