From e70e32c5f8d0d7b5af8b631837d7404e10442d89 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sat, 19 Mar 2016 19:23:23 -0700 Subject: [PATCH] use process.execPath instead of app.getPath('exec') MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They’re equivalent --- main/register-protocol-handler.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main/register-protocol-handler.js b/main/register-protocol-handler.js index a468e964..22a20c5b 100644 --- a/main/register-protocol-handler.js +++ b/main/register-protocol-handler.js @@ -1,10 +1,6 @@ -var electron = require('electron') - -var app = electron.app - module.exports = function () { if (process.platform === 'win32') { - registerProtocolHandler('magnet', 'URL:BitTorrent Magnet URL', app.getPath('exe')) + registerProtocolHandler('magnet', 'URL:BitTorrent Magnet URL', process.execPath) } }