set current_dir when launching

This commit is contained in:
mxve 2023-09-18 12:26:47 +02:00
parent d8beb754fa
commit 93d1c9841a

View File

@ -267,6 +267,7 @@ fn launch(file_path: &PathBuf, args: &str) {
println!("Launching {} {}", file_path.display(), args);
std::process::Command::new(file_path)
.args(args.trim().split(' '))
.current_dir(file_path.parent().unwrap())
.spawn()
.expect("Failed to launch the game")
.wait()