Skip to content

Commit

Permalink
fix: split path string manually
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin Swenson-Healey committed Mar 25, 2024
1 parent 3cf0aac commit 6cd886b
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 @@ -88,7 +88,7 @@ impl Regulation {

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

0 comments on commit 6cd886b

Please sign in to comment.