From c765c202888c065fb5bff3f61dc7b07a5f4c28ae Mon Sep 17 00:00:00 2001 From: VIAUD Nathan <nathan.viaud@inria.fr> Date: Thu, 7 Dec 2023 13:27:30 +0100 Subject: [PATCH] fix --- electron/electron.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/electron/electron.js b/electron/electron.js index 19393b59..bf87fd12 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -14,8 +14,7 @@ const headless = process.argv.includes('--headless=true'); let mainWindow; let splashWindow; -// Open file with editor, on windows : using argv | on macOS using open-file event (see below) -let filepath = process.platform === 'win32' && process.argv[1] ? path.normalize(process.argv[1]) : null; +let filepath = process.argv[1] ? path.normalize(process.argv[1]) : null; app.on('will-finish-launching', () => { app.on('open-file', async (event, path) => { @@ -47,12 +46,13 @@ app.whenReady().then(() => { mainWindow.show(); } + setupWindow(mainWindow); + if (filepath) { mainWindow.webContents.send('epocProjectPicked', JSON.stringify({name: null, modified: null, filepath: filepath, workdir: null})); } }); - setupWindow(mainWindow); app.on('activate', function () { // On macOS it's common to re-create a window in the app when the dock icon is clicked and there are no other windows open. -- GitLab