Skip to content

Commit 1adf172

Browse files
authored
Merge pull request #163 from Accedia/feat/show-dialog-on-file-not-found-in-appdata
Feat/show dialog on file not found in appdata
2 parents 03b6d37 + e2ed81f commit 1adf172

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

electron-app/src/utils/window_manager.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ class WindowManager {
6969
public startLoading = (): void => {
7070
console.log('starting loading');
7171
const shouldOpenVBS = process && process.argv.some((url) => url.includes('openVBS'))
72-
this.loadingWindow = new BrowserWindow({...WINDOW_CONFIG.loading,
72+
this.loadingWindow = new BrowserWindow({
73+
...WINDOW_CONFIG.loading,
7374
show: shouldOpenVBS ? false : true
7475
});
75-
if(shouldOpenVBS){
76+
if (shouldOpenVBS) {
7677
this.loadingWindow.minimize();
7778
}
7879
this.loadLoadingWindowContent();
@@ -85,6 +86,10 @@ class WindowManager {
8586
console.log(`Child process exited with code ${code}`);
8687
app.quit();
8788
});
89+
bat.on('error', (code) => {
90+
dialog.showErrorBox('Error', `The specified file was not found: ${fitMitchellCloudPath}, Error code : ${code}`);
91+
app.quit();
92+
})
8893
return;
8994
} catch (error) {
9095
dialog.showErrorBox('Error', 'The specified file was not found: C:\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');

0 commit comments

Comments
 (0)