diff --git a/src/seshat.ts b/src/seshat.ts index 77022b9..3e90659 100644 --- a/src/seshat.ts +++ b/src/seshat.ts @@ -47,8 +47,6 @@ try { } } -const eventStorePath = path.join(app.getPath('userData'), 'EventStore'); - let eventIndex: SeshatType | null = null; const seshatDefaultPassphrase = "DEFAULT_PASSPHRASE"; @@ -80,6 +78,9 @@ const deleteContents = async (p: string): Promise => { ipcMain.on('seshat', async function(_ev: IpcMainEvent, payload): Promise { if (!global.mainWindow) return; + // We do this here to ensure we get the path after --profile has been resolved + const eventStorePath = path.join(app.getPath('userData'), 'EventStore'); + const sendError = (id, e) => { const error = { message: e.message,