diff --git a/src/mod_component.rs b/src/mod_component.rs index 96caacf..4f2c9c0 100644 --- a/src/mod_component.rs +++ b/src/mod_component.rs @@ -1,7 +1,7 @@ use std::{ fs::File, io::{BufRead, BufReader}, - path::PathBuf, + path::{PathBuf, MAIN_SEPARATOR}, }; #[derive(Debug, PartialEq, Clone)] @@ -22,13 +22,13 @@ impl From for ModComponent { .to_string(); let tp_file = install_path - .split('/') + .split(MAIN_SEPARATOR) .nth(1) .expect("Could find tp2 file") .to_string(); let name = install_path - .split('/') + .split(MAIN_SEPARATOR) .next() .expect("Could not split mod into name and component") .to_ascii_lowercase();