don't copy if current & target path are the same
This commit is contained in:
parent
0dda3d295f
commit
5847b6a28a
@ -168,8 +168,12 @@ fn windows_launcher_install(games: &Vec<Game>) {
|
|||||||
let game = games.iter().find(|&g| g.app_id == input).unwrap();
|
let game = games.iter().find(|&g| g.app_id == input).unwrap();
|
||||||
|
|
||||||
let launcher_path = std::env::current_exe().unwrap();
|
let launcher_path = std::env::current_exe().unwrap();
|
||||||
fs::copy(launcher_path, path.join("alterware-launcher.exe")).unwrap();
|
let target_path = path.join("alterware-launcher.exe");
|
||||||
println!("Launcher copied to {}", path.display());
|
|
||||||
|
if launcher_path != target_path {
|
||||||
|
fs::copy(launcher_path, target_path).unwrap();
|
||||||
|
println!("Launcher copied to {}", path.display());
|
||||||
|
}
|
||||||
setup_client_links(game, path);
|
setup_client_links(game, path);
|
||||||
|
|
||||||
println!("Create Desktop shortcut? (Y/n)");
|
println!("Create Desktop shortcut? (Y/n)");
|
||||||
|
Loading…
Reference in New Issue
Block a user