diff --git a/main/registerIpcMainActionListeners.ts b/main/registerIpcMainActionListeners.ts index 7194dad0..d3e60626 100644 --- a/main/registerIpcMainActionListeners.ts +++ b/main/registerIpcMainActionListeners.ts @@ -41,7 +41,13 @@ export default function registerIpcMainActionListeners(main: Main) { ipcMain.handle( IPC_ACTIONS.GET_DB_DEFAULT_PATH, async (_, companyName: string) => { - let root = app.getPath('documents'); + let root: string; + try { + root = app.getPath('documents'); + } catch { + root = app.getPath('userData'); + } + if (main.isDevelopment) { root = 'dbs'; }