1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

format swift

This commit is contained in:
Kyle Spearrin 2019-09-09 10:13:36 -04:00
parent 5b72888ae8
commit b841805c1b

View File

@ -184,7 +184,7 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
let fileManager = FileManager.default let fileManager = FileManager.default
if !fileManager.fileExists(atPath: url.absoluteString) { if !fileManager.fileExists(atPath: url.absoluteString) {
fileManager.createFile(atPath: url.absoluteString, contents: Data(), fileManager.createFile(atPath: url.absoluteString, contents: Data(),
attributes: nil) attributes: nil)
} }
try data!.write(to: url) try data!.write(to: url)
} catch { } catch {
@ -217,7 +217,7 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
extension SafariExtensionViewController: WKUIDelegate { extension SafariExtensionViewController: WKUIDelegate {
func webView(_: WKWebView, runOpenPanelWith _: WKOpenPanelParameters, initiatedByFrame _: WKFrameInfo, func webView(_: WKWebView, runOpenPanelWith _: WKOpenPanelParameters, initiatedByFrame _: WKFrameInfo,
completionHandler: @escaping ([URL]?) -> Void) { completionHandler: @escaping ([URL]?) -> Void) {
let openPanel = NSOpenPanel() let openPanel = NSOpenPanel()
openPanel.canChooseFiles = true openPanel.canChooseFiles = true
openPanel.begin { result in openPanel.begin { result in