aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-05 15:23:55 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-07 12:36:19 +0530
commitf6faffa4c1e0c11b7e2756d18d747dde43add529 (patch)
tree89dd0fadd08b20b09cc0769b9fef57ad684e2ba8 /WireGuard/WireGuard/UI/iOS/AppDelegate.swift
parentNE: Logging: Log file should begin with version numbers and tunnel name (diff)
downloadwireguard-apple-f6faffa4c1e0c11b7e2756d18d747dde43add529.tar.xz
wireguard-apple-f6faffa4c1e0c11b7e2756d18d747dde43add529.zip
Refactoring: Consolidate file deletion into a separate function
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS/AppDelegate.swift')
-rw-r--r--WireGuard/WireGuard/UI/iOS/AppDelegate.swift8
1 files changed, 1 insertions, 7 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/AppDelegate.swift b/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
index 7ba77e4..3b414dd 100644
--- a/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
+++ b/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
@@ -27,14 +27,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
- defer {
- do {
- try FileManager.default.removeItem(at: url)
- } catch {
- os_log("Failed to remove item from Inbox: %{public}@", log: OSLog.default, type: .debug, url.absoluteString)
- }
- }
mainVC?.tunnelsListVC?.importFromFile(url: url)
+ _ = FileManager.deleteFile(at: url)
return true
}