From 0d23187eef6c035d668359ea7a02acaf23460a79 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 27 Oct 2018 13:15:26 +0200 Subject: [PATCH] Delete unparsable .ovpn --- Passepartout-iOS/AppDelegate.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Passepartout-iOS/AppDelegate.swift b/Passepartout-iOS/AppDelegate.swift index 795ea6b4..9714d8f1 100644 --- a/Passepartout-iOS/AppDelegate.swift +++ b/Passepartout-iOS/AppDelegate.swift @@ -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 }