From 2b14f52db96aaa2a45c6b8b4d9ab980ba0231180 Mon Sep 17 00:00:00 2001 From: MathieuG-P Date: Thu, 29 Dec 2022 15:10:48 +0100 Subject: [PATCH] just try to link maps after download a BS version --- src/main/ipcs/bs-download-ipcs.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/ipcs/bs-download-ipcs.ts b/src/main/ipcs/bs-download-ipcs.ts index 6d592c01..d9e8b748 100644 --- a/src/main/ipcs/bs-download-ipcs.ts +++ b/src/main/ipcs/bs-download-ipcs.ts @@ -5,6 +5,7 @@ import { IpcRequest } from 'shared/models/ipc'; import { InstallationLocationService } from '../services/installation-location.service'; import { UtilsService } from '../services/utils.service'; import { BsmException } from 'shared/models/bsm-exception.model'; +import { LocalMapsManagerService } from '../services/additional-content/local-maps-manager.service'; export interface InitDownloadInfoInterface { @@ -25,7 +26,8 @@ export interface DownloadInfo { } ipcMain.on('bs-download.start', async (event, request: IpcRequest) => { - BSInstallerService.getInstance().downloadBsVersion(request.args).then(res => { + BSInstallerService.getInstance().downloadBsVersion(request.args).then(async res => { + await LocalMapsManagerService.getInstance().linkVersionMaps(request.args.bsVersion, true).catch(e => {}); UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res}); }).catch(e => { UtilsService.getInstance().ipcSend(request.responceChannel, {success: false, data: e});