diff --git a/src/dolphin/install/ishiiruka_installation.ts b/src/dolphin/install/ishiiruka_installation.ts index d8e1c281d..63a101eed 100644 --- a/src/dolphin/install/ishiiruka_installation.ts +++ b/src/dolphin/install/ishiiruka_installation.ts @@ -309,8 +309,5 @@ export class IshiirukaDolphinInstallation implements DolphinInstallation { ); } } - await fs.remove(assetPath).catch((err) => { - log.error(`Could not delete dolphin asset: ${err}`); - }); } } diff --git a/src/dolphin/install/mainline_installation.ts b/src/dolphin/install/mainline_installation.ts index 997098ca8..6c45105ac 100644 --- a/src/dolphin/install/mainline_installation.ts +++ b/src/dolphin/install/mainline_installation.ts @@ -305,8 +305,5 @@ export class MainlineDolphinInstallation implements DolphinInstallation { ); } } - await fs.remove(assetPath).catch((err) => { - log.error(`Could not delete dolphin asset: ${err}`); - }); } } diff --git a/src/renderer/lib/hooks/use_app.ts b/src/renderer/lib/hooks/use_app.ts index 18ab2e267..5c95ecf54 100644 --- a/src/renderer/lib/hooks/use_app.ts +++ b/src/renderer/lib/hooks/use_app.ts @@ -92,6 +92,19 @@ export const useAppInitialization = () => { // Check if there is an update to the launcher promises.push(window.electron.common.checkForAppUpdates()); + // Remove any temp files + promises.push( + (async () => { + window.electron.common.clearTempFolder().catch((err) => { + // silently fail since this isn't a critical issue + log.error( + `Could not clear temp folder on startup due to: + ${err instanceof Error ? err.message : JSON.stringify(err)}`, + ); + }); + })(), + ); + // Wait for all the promises to complete before completing try { await Promise.all(promises);