mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 00:04:25 +00:00
Fix sandboxing issues with default browser setting.
This commit is contained in:
1 parent
18c9102101
commit
e1111168f0
1 file changed
+6
-11
@@ -146,13 +146,9 @@ import UniformTypeIdentifiers
|
||||
return _bundleIdentifier
|
||||
}
|
||||
|
||||
private lazy var _bundlePath: String? = {
|
||||
return Bundle(url: url)?.bundlePath
|
||||
}()
|
||||
|
||||
/// The bundle path of the web browser
|
||||
public var bundlePath: String? {
|
||||
return _bundlePath
|
||||
/// The bundle path of the web browser.
|
||||
public var bundlePath: String {
|
||||
url.path
|
||||
}
|
||||
|
||||
/// Initializes a `MacWebBrowser` with a URL on disk.
|
||||
@@ -173,13 +169,12 @@ import UniformTypeIdentifiers
|
||||
|
||||
/// Initializes a `MacWebBrowser` from a path.
|
||||
/// - Parameter path: Path to the app, as in `/Applications/Firefox.app`.
|
||||
/// - Returns: `nil` if no app exists at `path`.
|
||||
/// - Returns: `nil` if nothing exists at `path`.
|
||||
public convenience init?(path: String) {
|
||||
let url = URL(fileURLWithPath: path)
|
||||
guard Bundle(url: url) != nil else {
|
||||
guard FileManager.default.fileExists(atPath: path) else {
|
||||
return nil
|
||||
}
|
||||
self.init(url: url)
|
||||
self.init(url: URL(fileURLWithPath: path))
|
||||
}
|
||||
|
||||
/// Opens a URL in this browser.
|
||||
|
||||
Reference in new issue
Block a user