Skip to content
Snippets Groups Projects
Unverified Commit 48f5880f authored by Michael Clark's avatar Michael Clark Committed by GitHub
Browse files

:electron: Fix "Export" function on desktop app (#2925)

* fix electron export file

* add release notes
parent 3332f583
No related branches found
No related tags found
No related merge requests found
...@@ -309,12 +309,12 @@ ipcMain.handle('open-file-dialog', (event, { filters, properties }) => { ...@@ -309,12 +309,12 @@ ipcMain.handle('open-file-dialog', (event, { filters, properties }) => {
ipcMain.handle( ipcMain.handle(
'save-file-dialog', 'save-file-dialog',
(event, { title, defaultPath, fileContents }) => { async (event, { title, defaultPath, fileContents }) => {
const fileLocation = dialog.showSaveDialogSync({ title, defaultPath }); const fileLocation = await dialog.showSaveDialog({ title, defaultPath });
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (fileLocation) { if (fileLocation) {
fs.writeFile(fileLocation, fileContents, error => { fs.writeFile(fileLocation.filePath, fileContents, error => {
return reject(error); return reject(error);
}); });
} }
......
---
category: Bugfix
authors: [MikesGlitch]
---
Fixes "Export data" not saving the file in Electron app on Linux
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment