attempt to fix Windows

This commit is contained in:
Erik Krogh Kristensen
2022-05-31 10:25:48 +00:00
committed by GitHub
parent c28107bce3
commit f33bd2fecc

View File

@@ -41,6 +41,10 @@ fn main() -> std::io::Result<()> {
// converts the relative path `stripped` to an absolute path by prepending the working directory
fn absolutelyfy(stripped: &str) -> String {
let pwd = env::current_dir().unwrap();
pwd.join(stripped).into_os_string().into_string().unwrap()
let path = pwd.join(stripped).into_os_string().into_string().unwrap();
if env::consts::OS == "windows" {
path.replace("\\", "/")
} else {
path
}
}