[MM-21869] handle downloading in a new way to adapt to electron v6 (#1159)

This commit is contained in:
Guillermo Vayá
2020-01-23 11:56:29 +01:00
committed by GitHub
parent f6129c8253
commit 458c3b2797

View File

@@ -695,17 +695,11 @@ function initializeAfterAppReady() {
name: 'All files',
extensions: ['*'],
});
const savePath = dialog.showSaveDialog({
item.setSaveDialogOptions({
title: filename,
defaultPath: os.homedir() + '/Downloads/' + filename,
filters,
});
if (savePath) {
item.setSavePath(savePath);
} else {
item.cancel();
}
});
ipcMain.emit('update-menu', true, config.data);