Fix up export
This commit is contained in:
@ -15,7 +15,7 @@ const save_ = async (file: ModelingAppFile) => {
|
||||
}
|
||||
|
||||
// Open a dialog to save the file.
|
||||
const filePath = await window.electron.save({
|
||||
const filePathMeta = await window.electron.save({
|
||||
defaultPath: file.name,
|
||||
filters: [
|
||||
{
|
||||
@ -25,14 +25,12 @@ const save_ = async (file: ModelingAppFile) => {
|
||||
],
|
||||
})
|
||||
|
||||
if (filePath === null) {
|
||||
// The user canceled the save.
|
||||
// Return early.
|
||||
return
|
||||
}
|
||||
// The user canceled the save.
|
||||
// Return early.
|
||||
if (filePathMeta.canceled) return
|
||||
|
||||
// Write the file.
|
||||
await window.electron.writeFile(filePath, new Uint8Array(file.contents))
|
||||
await window.electron.writeFile(filePathMeta.filePath, new Uint8Array(file.contents))
|
||||
} else {
|
||||
// Download the file to the user's computer.
|
||||
// Now we need to download the files to the user's downloads folder.
|
||||
|
Reference in New Issue
Block a user