From 9f951fc68bfe619acfe6e24312d0ada3324c5297 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 27 Oct 2018 12:40:45 +0200 Subject: [PATCH] Delete .ovpn after import --- .../Scenes/Organizer/WizardHostViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Passepartout-iOS/Scenes/Organizer/WizardHostViewController.swift b/Passepartout-iOS/Scenes/Organizer/WizardHostViewController.swift index db2c4b73..6f044c61 100644 --- a/Passepartout-iOS/Scenes/Organizer/WizardHostViewController.swift +++ b/Passepartout-iOS/Scenes/Organizer/WizardHostViewController.swift @@ -134,6 +134,9 @@ class WizardHostViewController: UITableViewController, TableModelHost, Wizard { do { let savedURL = try TransientStore.shared.service.save(configurationURL: url, for: profile) log.debug("Associated .ovpn configuration file to profile '\(profile.id)': \(savedURL)") + + // can now delete imported file + try? FileManager.default.removeItem(at: url) } catch let e { log.error("Could not associate .ovpn configuration file to profile: \(e)") }