set current_dir when launching

This commit is contained in:
mxve 2023-09-18 12:26:47 +02:00
parent 237fa8c16f
commit 59f1b09337

View File

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