Merge pull request #690 from KKishikawa/fix/correctly-select-save-folder-dump

fix(app): Correctly select the save folder for dump
This commit is contained in:
Infinity
2024-01-20 19:15:55 +01:00
committed by GitHub

View File

@@ -63,16 +63,17 @@
const handleBrowse = async () => { const handleBrowse = async () => {
const electron = getElectron(); const electron = getElectron();
const files = await electron.showSaveDialog({ const file = await electron.showSaveDialog({
properties: ['showOverwriteConfirmation'], properties: ['showOverwriteConfirmation'],
filters: [ filters: [
{ name: 'SQL Files', extensions: ['sql'] }, { name: 'SQL Files', extensions: ['sql'] },
{ name: 'All Files', extensions: ['*'] }, { name: 'All Files', extensions: ['*'] },
], ],
defaultPath: outputFile,
}); });
if (files && files[0]) { if (file) {
const path = window.require('path'); const path = window.require('path');
outputFile = files[0]; outputFile = file;
outputLabel = path.parse(outputFile).name; outputLabel = path.parse(outputFile).name;
pureFileName = null; pureFileName = null;
} }