From 09d6fa550adce28187aa86ee625935f383e90e64 Mon Sep 17 00:00:00 2001 From: DC Date: Fri, 12 Aug 2016 09:31:28 -0700 Subject: [PATCH] Handle Save Torrent File As... -> Cancel --- src/renderer/controllers/torrent-list-controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/controllers/torrent-list-controller.js b/src/renderer/controllers/torrent-list-controller.js index 5d5a8987..bb39ce97 100644 --- a/src/renderer/controllers/torrent-list-controller.js +++ b/src/renderer/controllers/torrent-list-controller.js @@ -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)