Skip to content

Commit

Permalink
Merge pull request #3 from chozandrias76/chozandrias76-unify-path-spl…
Browse files Browse the repository at this point in the history
…itting

fix: split path string manually
  • Loading branch information
ClayAmore authored Mar 25, 2024
2 parents f7a1f45 + 96841aa commit 4325857
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util/regulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ impl Regulation {
let mut params: HashMap<Param, Vec<u8>> = HashMap::new();

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 4325857

Please sign in to comment.