fix: added 3.7.0 game update workaround

This commit is contained in:
Observer KRypt0n_ 2023-05-24 19:53:22 +02:00
parent ba5963ae08
commit 3edd5ea106
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2

View file

@ -22,7 +22,7 @@ pub fn download_diff(sender: ComponentSender<App>, progress_bar_input: Sender<Pr
diff = diff.with_temp_folder(temp);
}
let result = diff.install_to(game_path, clone!(@strong sender => move |state| {
let result = diff.install_to(&game_path, clone!(@strong sender => move |state| {
match &state {
DiffUpdate::InstallerUpdate(InstallerUpdate::DownloadingError(err)) => {
tracing::error!("Downloading failed: {err}");
@ -65,6 +65,13 @@ pub fn download_diff(sender: ComponentSender<App>, progress_bar_input: Sender<Pr
perform_on_download_needed = false;
}
// Temporary workaround for 3.7.0 game update
let telemetry_file = game_path.join(config.launcher.edition.data_folder()).join("Plugins/Telemetry.dll");
if telemetry_file.exists() {
std::fs::remove_file(telemetry_file).unwrap();
}
sender.input(AppMsg::SetDownloading(false));
sender.input(AppMsg::UpdateLauncherState {
perform_on_download_needed,