Skip to content
Snippets Groups Projects

Fixes delete account

Merged Bruno Muniz requested to merge fix/delete-account into dev
All threads resolved!
1 file
+ 8
2
Compare changes
  • Side-by-side
  • Inline
@@ -22,8 +22,14 @@ extension DBManagerRemoveDB {
@@ -22,8 +22,14 @@ extension DBManagerRemoveDB {
unsetDB()
unsetDB()
try db?.drop()
try db?.drop()
let fm = FileManager.default
let fm = FileManager.default
if fm.fileExists(atPath: url.path) {
if fm.fileExists(atPath: url.path), url.startAccessingSecurityScopedResource() {
try fm.removeItem(atPath: url.path)
do {
 
try fm.removeItem(atPath: url.path)
 
url.stopAccessingSecurityScopedResource()
 
} catch {
 
url.stopAccessingSecurityScopedResource()
 
throw error
 
}
}
}
}
}
}
}
Loading