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>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user