Delete .ovpn after import
This commit is contained in:
parent
dcecc84bda
commit
9f951fc68b
|
@ -134,6 +134,9 @@ class WizardHostViewController: UITableViewController, TableModelHost, Wizard {
|
||||||
do {
|
do {
|
||||||
let savedURL = try TransientStore.shared.service.save(configurationURL: url, for: profile)
|
let savedURL = try TransientStore.shared.service.save(configurationURL: url, for: profile)
|
||||||
log.debug("Associated .ovpn configuration file to profile '\(profile.id)': \(savedURL)")
|
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 {
|
} catch let e {
|
||||||
log.error("Could not associate .ovpn configuration file to profile: \(e)")
|
log.error("Could not associate .ovpn configuration file to profile: \(e)")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue