Delete unparsable .ovpn

This commit is contained in:
Davide De Rosa 2018-10-27 13:15:26 +02:00
parent 9f951fc68b
commit 0d23187eef
1 changed files with 2 additions and 0 deletions

View File

@ -90,7 +90,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
fatalError("No window.rootViewController?")
}
let fm = FileManager.default
guard let parsedFile = ParsedFile.from(url, withErrorAlertIn: root) else {
try? fm.removeItem(at: url)
return true
}