diff --git a/packages/desktop-electron/index.js b/packages/desktop-electron/index.js index 909a0cc7f8f861252dcc1a09a35eb27c2a7a073d..f3b2fca55ae9c0a4d4b0e2d717a5272e0ceff754 100644 --- a/packages/desktop-electron/index.js +++ b/packages/desktop-electron/index.js @@ -309,12 +309,12 @@ ipcMain.handle('open-file-dialog', (event, { filters, properties }) => { ipcMain.handle( 'save-file-dialog', - (event, { title, defaultPath, fileContents }) => { - const fileLocation = dialog.showSaveDialogSync({ title, defaultPath }); + async (event, { title, defaultPath, fileContents }) => { + const fileLocation = await dialog.showSaveDialog({ title, defaultPath }); return new Promise((resolve, reject) => { if (fileLocation) { - fs.writeFile(fileLocation, fileContents, error => { + fs.writeFile(fileLocation.filePath, fileContents, error => { return reject(error); }); } diff --git a/upcoming-release-notes/2925.md b/upcoming-release-notes/2925.md new file mode 100644 index 0000000000000000000000000000000000000000..f588b238bd76278bbf43b78af03ad7ee034a2029 --- /dev/null +++ b/upcoming-release-notes/2925.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MikesGlitch] +--- + +Fixes "Export data" not saving the file in Electron app on Linux