small bugfixes

This commit is contained in:
2024-04-23 09:38:11 +02:00
parent 3bd1fb9edb
commit 9f9804f161
2 changed files with 21 additions and 6 deletions

11
main.js
View File

@@ -587,6 +587,15 @@ function registerIPCPipes() {
}/${formatBytes(data.total)})...`,
});
});
patcherDownloader.eventEmitter.on("delete", (data) => {
logger.log(`Deleting ${data.fileName}!`);
mainWindow.webContents.send("ezpplauncher:launchprogress", {
progress: -1,
});
mainWindow.webContents.send("ezpplauncher:launchstatus", {
status: `Deleting ${data.fileName}...`,
});
});
await patcherDownloader.startDownload();
mainWindow.webContents.send("ezpplauncher:launchprogress", {
progress: -1,
@@ -664,7 +673,7 @@ function registerIPCPipes() {
if (fs.existsSync(updateFile)) {
await fs.promises.rm(updateFile, {
force: true,
recursive: (await fs.promises.lstat(updateFile)).isDirectory,
recursive: (await fs.promises.lstat(updateFile)).isDirectory(),
});
}
}