mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-08-07 05:36:19 +01:00
showSaveDialog: Restore default path when saving attachments
This commit is contained in:
@@ -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,
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user