1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-02 08:40:08 +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
if !fileManager.fileExists(atPath: url.absoluteString) {
fileManager.createFile(atPath: url.absoluteString, contents: Data(),
attributes: nil)
attributes: nil)
}
try data!.write(to: url)
} catch {
@ -217,7 +217,7 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
extension SafariExtensionViewController: WKUIDelegate {
func webView(_: WKWebView, runOpenPanelWith _: WKOpenPanelParameters, initiatedByFrame _: WKFrameInfo,
completionHandler: @escaping ([URL]?) -> Void) {
completionHandler: @escaping ([URL]?) -> Void) {
let openPanel = NSOpenPanel()
openPanel.canChooseFiles = true
openPanel.begin { result in