From 364d31c04b135e871e3b5a8c4ba325f91b5cc508 Mon Sep 17 00:00:00 2001 From: dinglili Date: Tue, 11 Jun 2024 16:53:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8B=E8=BD=BD=E4=BD=86?= =?UTF-8?q?=E6=98=AF=E4=B8=8D=E7=94=A8=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../electron-sandbox/deploy/deployWindowMain.ts | 4 ++-- .../issue/electron-main/deployMainService.ts | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/vs/code/electron-sandbox/deploy/deployWindowMain.ts b/src/vs/code/electron-sandbox/deploy/deployWindowMain.ts index a1ba3fd8..587402fc 100644 --- a/src/vs/code/electron-sandbox/deploy/deployWindowMain.ts +++ b/src/vs/code/electron-sandbox/deploy/deployWindowMain.ts @@ -580,8 +580,8 @@ class deployWindow { ipcRenderer.send('kylinide.installWizard.init', { type: "writeJson", }); } else if (this.onlineInstallTabArray[this.onlineInstallTabArrayIndex] === "onlineInstallTab4") { this.removeAllListeners(); - ipcRenderer.send('kylinide.installWizard.skipWizard'); - console.log("onlineInstallTab4"); + ipcRenderer.send('kylinide.installWizard.closeWizard', { type: "close" }); + this.custom_print("onlineInstallTab4"); return; } if (this.onlineInstallTabArrayIndex < this.onlineInstallTabArray.length - 1) { diff --git a/src/vs/platform/issue/electron-main/deployMainService.ts b/src/vs/platform/issue/electron-main/deployMainService.ts index 3630c520..2d00a223 100644 --- a/src/vs/platform/issue/electron-main/deployMainService.ts +++ b/src/vs/platform/issue/electron-main/deployMainService.ts @@ -195,6 +195,16 @@ export class DeployMainService implements IDeployMainService { }; listenerCloseWindow = (event: IpcMainEvent) => { this.logger.info("关闭窗口"); + //删除新下载但是没被使用的配置文件 + if (this.updateConfigDir) { + // const selectdir = this.localConfigDir; + this.logger.info("this.updateConfgDir======", this.updateConfigDir); + this.logger.info("this.localConfigDir======", this.localConfigDir); + if (this.updateConfigDir !== this.localConfigDir) + if (fs.existsSync(this.updateConfigDir)) + fs.rmdirSync(this.updateConfigDir, { recursive: true }); + } + this.closeWindow(); }; @@ -209,7 +219,8 @@ export class DeployMainService implements IDeployMainService { try { const installItem = this.extDownloadPath + msg.downloadDone; - const installCommand = "kylin-ide --install-extension " + installItem; + const installCommand = "kylin-ide --install-extension " + installItem; + this.logger.debug("installCommand", installCommand); if (this.installQueue.length === 0) { this.installQueue.push({ installCommand, msg }); await this.executeNextInstall();