Skip to content

Commit

Permalink
Merge pull request #23 from dark0dave/fix/21
Browse files Browse the repository at this point in the history
fix(window): Use MAIN_SEPARATOR, to fix path issues on window
  • Loading branch information
dark0dave authored Nov 11, 2023
2 parents 0a65b37 + b9b1242 commit dededf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mod_component.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{
fs::File,
io::{BufRead, BufReader},
path::PathBuf,
path::{PathBuf, MAIN_SEPARATOR},
};

#[derive(Debug, PartialEq, Clone)]
Expand All @@ -22,13 +22,13 @@ impl From<String> 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();
Expand Down

0 comments on commit dededf4

Please sign in to comment.