Added buttonLabel as Save in the save dialog

This commit is contained in:
Gael Patarin
2019-11-26 14:30:09 +01:00
parent 600646b6ce
commit f30343b821

View File

@@ -296,13 +296,14 @@ module.exports = class TorrentListController {
filters: [
{ name: 'Torrent Files', extensions: ['torrent'] },
{ name: 'All Files', extensions: ['*'] }
]
],
buttonLabel: 'Save'
}
const savePath = electron.remote.dialog.showSaveDialogSync(win, opts)
console.log('Saving torrent ' + torrentKey + ' to ' + savePath)
if (!savePath) return // They clicked Cancel
console.log('Saving torrent ' + torrentKey + ' to ' + savePath)
const torrentPath = TorrentSummary.getTorrentPath(torrentSummary)
fs.readFile(torrentPath, function (err, torrentFile) {
if (err) return dispatch('error', err)