Ensure EventStore is created in the appropriate userData directory (#433)

This commit is contained in:
Michael Telatynski 2022-11-04 14:58:23 +00:00 committed by GitHub
parent 43484b21f4
commit 2032f64766
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<void> => {
ipcMain.on('seshat', async function(_ev: IpcMainEvent, payload): Promise<void> {
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,