showSaveDialog: Restore default path when saving attachments

This commit is contained in:
Scott Nonnenberg
2026-07-31 10:49:51 -04:00
committed by GitHub
parent 3c037b95ed
commit 40b167e596
+4
View File
@@ -3215,9 +3215,13 @@ ipc.handle('show-save-dialog', async (_event, { defaultPath }) => {
return { canceled: true };
}
// Workaround KDE portal file dialog default path issue
const osDefaultPath = OS.isLinuxUsingKDE() ? `~/${defaultPath}` : defaultPath;
const { canceled, filePath: selectedFilePath } = await dialog.showSaveDialog(
mainWindow,
{
defaultPath: osDefaultPath,
showsTagField: false,
}
);