Activate service migration

This commit is contained in:
Davide De Rosa 2018-10-25 20:01:51 +02:00
parent d087acd512
commit 09685e6994
2 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,7 @@ extension ConnectionService {
static func migrateJSON(at from: URL, to: URL) {
do {
let newData = try migrateJSON(at: from)
// log.verbose(String(data: newData, encoding: .utf8)!)
try newData.write(to: to)
} catch let e {
log.warning("Could not migrate service: \(e)")

View File

@ -55,6 +55,8 @@ class TransientStore {
)
let cfg = AppConstants.VPN.tunnelConfiguration()
do {
ConnectionService.migrateJSON(at: servicePath, to: servicePath)
let data = try Data(contentsOf: servicePath)
if let content = String(data: data, encoding: .utf8) {
log.verbose("Service JSON:")