Delete .ovpn after import

This commit is contained in:
Davide De Rosa 2018-10-27 12:40:45 +02:00
parent dcecc84bda
commit 9f951fc68b
1 changed files with 3 additions and 0 deletions

View File

@ -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)")
}