Skip to content

Commit

Permalink
Fixes for PR #640
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Jun 24, 2016
1 parent b2d2a6a commit 4799a03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions main/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function installDarwin () {

// On OS X, only protocols that are listed in `Info.plist` can be set as the
// default handler at runtime.
app.setAsDefaultProtocolClient('magnet')
app.setAsDefaultProtocolClient('stream-magnet')

// File handlers are defined in `Info.plist`.
Expand Down
2 changes: 1 addition & 1 deletion renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ function onOpen (files) {
function isTorrent (file) {
var name = typeof file === 'string' ? file : file.name
var isTorrentFile = path.extname(name).toLowerCase() === '.torrent'
var isMagnet = typeof file === 'string' && /^magnet:/.test(file) || /^stream-magnet:/.test(file)
var isMagnet = typeof file === 'string' && /^(stream-)?magnet:/.test(file)
return isTorrentFile || isMagnet
}

Expand Down

0 comments on commit 4799a03

Please sign in to comment.