Skip to content

Commit

Permalink
Work around bug in showSaveDialogSync on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
c2d7fa committed Dec 12, 2021
1 parent 9528294 commit a9405dc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/desktop/start.tsx
Expand Up @@ -13,11 +13,13 @@ Electron.app.whenReady().then(async () => {

window.setMenu(null);

Electron.ipcMain.handle("open-file", () => {
return Electron.dialog.showSaveDialogSync(window, {
title: "Open or Create File",
buttonLabel: "Open",
});
Electron.ipcMain.handle("open-file", async () => {
return (
await Electron.dialog.showSaveDialog(window, {
title: "Open or Create File",
buttonLabel: "Open",
})
).filePath;
});

// [TODO] We need to do build/whatever only when using electron-builder for
Expand Down

0 comments on commit a9405dc

Please sign in to comment.