From 9bda7d0b733af7adc39902d97b2c5172270dc867 Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Wed, 20 Jun 2018 17:10:23 +1000 Subject: [PATCH] set mac protocol to none (#13326) --- atom/browser/browser_mac.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atom/browser/browser_mac.mm b/atom/browser/browser_mac.mm index dfbdf710d452..cd606418ccf7 100644 --- a/atom/browser/browser_mac.mm +++ b/atom/browser/browser_mac.mm @@ -78,6 +78,11 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol, } } + // No other app was found set it to none instead of setting it back to itself. + if ([identifier isEqualToString:(__bridge NSString*)other]) { + other = base::mac::NSToCFCast(@"None"); + } + OSStatus return_code = LSSetDefaultHandlerForURLScheme(protocol_cf, other); return return_code == noErr; }