Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure EventStore is created in the appropriate userData directory #433

Merged
merged 3 commits into from
Nov 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/seshat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ try {
}
}

const eventStorePath = path.join(app.getPath('userData'), 'EventStore');

let eventIndex: SeshatType | null = null;

const seshatDefaultPassphrase = "DEFAULT_PASSPHRASE";
Expand Down Expand Up @@ -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,
Expand Down