mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #268 from meshtastic/fix-mbtiles-import
Add security call when importing mbtiles file
This commit is contained in:
commit
d5d0c51f12
2 changed files with 7 additions and 1 deletions
2
.github/ISSUE_TEMPLATE/feature.yml
vendored
2
.github/ISSUE_TEMPLATE/feature.yml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
name: Feature Request
|
||||
description: Request a new feature
|
||||
title: "[Enhancement]: "
|
||||
title: "[Feature Request]: "
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
|
|
|
|||
|
|
@ -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