Skip to content
Snippets Groups Projects
Commit 8f944118 authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Merge branch 'fix/delete-account' into 'dev'

Fixes delete account

See merge request elixxir/client-ios!84
parents eb99e4b7 15688e57
No related branches found
No related tags found
1 merge request!84Fixes delete account
......@@ -22,8 +22,14 @@ extension DBManagerRemoveDB {
unsetDB()
try db?.drop()
let fm = FileManager.default
if fm.fileExists(atPath: url.path) {
try fm.removeItem(atPath: url.path)
if fm.fileExists(atPath: url.path), url.startAccessingSecurityScopedResource() {
do {
try fm.removeItem(atPath: url.path)
url.stopAccessingSecurityScopedResource()
} catch {
url.stopAccessingSecurityScopedResource()
throw error
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment