From 4b3897c7f066fc6c5f79b91dd16379fa9030621b Mon Sep 17 00:00:00 2001 From: Kenta Kishikawa Date: Mon, 15 Jan 2024 00:08:35 +0900 Subject: [PATCH] fix(app): Correctly select the save folder for dump --- packages/web/src/modals/ExportDatabaseDumpModal.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/web/src/modals/ExportDatabaseDumpModal.svelte b/packages/web/src/modals/ExportDatabaseDumpModal.svelte index 7b3febbf..3740b934 100644 --- a/packages/web/src/modals/ExportDatabaseDumpModal.svelte +++ b/packages/web/src/modals/ExportDatabaseDumpModal.svelte @@ -63,16 +63,17 @@ const handleBrowse = async () => { const electron = getElectron(); - const files = await electron.showSaveDialog({ + const file = await electron.showSaveDialog({ properties: ['showOverwriteConfirmation'], filters: [ { name: 'SQL Files', extensions: ['sql'] }, { name: 'All Files', extensions: ['*'] }, ], + defaultPath: outputFile, }); - if (files && files[0]) { + if (file) { const path = window.require('path'); - outputFile = files[0]; + outputFile = file; outputLabel = path.parse(outputFile).name; pureFileName = null; }