fix throwing error screen before loading update

This commit is contained in:
RoyceDa
2026-01-30 17:20:14 +02:00
parent d099346056
commit ad696616e1
4 changed files with 121 additions and 80 deletions

View File

@@ -15,6 +15,13 @@ ipcMain.handleOnce('report-boot-process-failed', async () => {
* приложение попыталось загрузиться в режиме разработки.
*/
let filePath = path.join(WORKING_DIR, 'b');
if(!await existsFile(filePath)){
/**
* Исправление ошибки когда директории нет.
*/
logger.log("No compiled files to remove");
return;
}
await fs.rmdir(filePath, { recursive: true });
logger.log("Boot process failed, removed compiled files");
logger.log(`Removed compiled files at ${filePath}`);