dark0dave / mod_installer

Infinity Engine Mod Installer, auto install mods from your backed up weidu log file
https://dark0dave.github.io/mod_installer/rust_docs
GNU General Public License v3.0
11 stars 0 forks source link

Support platform-independent directory separators in installation paths #21

Closed podcherklife closed 11 months ago

podcherklife commented 11 months ago

I've got a weidu.log generated on Windows machine which looks like this:

// ...
~BG1UB\SETUP-BG1UB.TP2~ #0 #11 // Scar and the Sashenstar's Daughter: v16.4
// ...

Here, path separator breaks the following code from mod installer:

        let tp_file = install_path
            .split('/')
            .nth(1)
            .expect("Could find tp2 file")
            .to_string();
dark0dave commented 11 months ago

Sure I'll check on that.

dark0dave commented 11 months ago

This https://doc.rust-lang.org/std/path/constant.MAIN_SEPARATOR.html should fix that. Thank you for the issue!