mirror of
https://github.com/frappe/books.git
synced 2024-12-22 10:58:59 +00:00
fix: use fallback if documents not available
This commit is contained in:
parent
f95a93860a
commit
a0cea8683e
@ -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';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user