mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Add security call when importing mbtiles file
This commit is contained in:
parent
f82bb2fc2d
commit
44a388f0c8
1 changed files with 6 additions and 0 deletions
|
|
@ -66,6 +66,12 @@ struct MeshtasticAppleApp: App {
|
|||
let destination = documentsDirectory.appendingPathComponent("offline_map.mbtiles", isDirectory: false)
|
||||
|
||||
if !self.saveChannels {
|
||||
|
||||
//tell the system we want the file please
|
||||
guard url.startAccessingSecurityScopedResource() else {
|
||||
return
|
||||
}
|
||||
|
||||
//do we need to delete an old one?
|
||||
if (fileManager.fileExists(atPath: destination.path)) {
|
||||
print("ℹ️ Found an old map file. Deleting it")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue