Handle Save Torrent File As... -> Cancel

This commit is contained in:
DC
2016-08-12 09:31:28 -07:00
parent 4d48b9e7c1
commit 09d6fa550a

View File

@@ -274,6 +274,7 @@ function saveTorrentFileAs (torrentSummary) {
]
}
electron.remote.dialog.showSaveDialog(electron.remote.getCurrentWindow(), opts, function (savePath) {
if (!savePath) return // They clicked Cancel
var torrentPath = TorrentSummary.getTorrentPath(torrentSummary)
fs.readFile(torrentPath, function (err, torrentFile) {
if (err) return dispatch('error', err)