Making the save file dialog sync to ensure working properly on MacOS and others

This commit is contained in:
gpatarin
2019-11-09 23:43:03 +01:00
parent 0198d7493d
commit 600646b6ce

View File

@@ -299,7 +299,8 @@ module.exports = class TorrentListController {
]
}
electron.remote.dialog.showSaveDialog(win, opts, function (savePath) {
const savePath = electron.remote.dialog.showSaveDialogSync(win, opts)
console.log('Saving torrent ' + torrentKey + ' to ' + savePath)
if (!savePath) return // They clicked Cancel
const torrentPath = TorrentSummary.getTorrentPath(torrentSummary)
@@ -309,7 +310,6 @@ module.exports = class TorrentListController {
if (err) return dispatch('error', err)
})
})
})
}
}