aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-12 19:24:12 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-12 19:24:18 +0530
commitaf78fa9a1ceac63b6302d7115c706757d2896263 (patch)
tree391bd6bb30368e331a3edb92159c983c2480e7d4 /WireGuard/WireGuard/UI/iOS/AppDelegate.swift
parentErrorPresenter: Support onPresented for showErrorAlert(title:,message:) (diff)
downloadwireguard-apple-af78fa9a1ceac63b6302d7115c706757d2896263.tar.xz
wireguard-apple-af78fa9a1ceac63b6302d7115c706757d2896263.zip
Zip importing: importFromFile should take a completionHandler
Deletion of the being-imported file should be done in the completionHandler. 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.swift5
1 files changed, 3 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/AppDelegate.swift b/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
index 5dca2ad..d62890e 100644
--- a/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
+++ b/WireGuard/WireGuard/UI/iOS/AppDelegate.swift
@@ -27,8 +27,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
- mainVC?.tunnelsListVC?.importFromFile(url: url)
- _ = FileManager.deleteFile(at: url)
+ mainVC?.tunnelsListVC?.importFromFile(url: url) {
+ _ = FileManager.deleteFile(at: url)
+ }
return true
}