mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-10-31 10:28:36 +00:00
missing changes :(
This commit is contained in:
@@ -45,10 +45,11 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
||||
}
|
||||
|
||||
func loadItems() {
|
||||
let appSupportDirectory = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first!
|
||||
let presetPath = appSupportDirectory.appending("items.json")
|
||||
let appSupportDirectory = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first!.appending("/MTMR")
|
||||
let presetPath = appSupportDirectory.appending("/items.json")
|
||||
if !FileManager.default.fileExists(atPath: presetPath),
|
||||
let defaultPreset = Bundle.main.path(forResource: "defaultPreset", ofType: "json") {
|
||||
try? FileManager.default.createDirectory(atPath: appSupportDirectory, withIntermediateDirectories: true, attributes: nil)
|
||||
try? FileManager.default.copyItem(atPath: defaultPreset, toPath: presetPath)
|
||||
}
|
||||
let jsonData = try? Data(contentsOf: URL(fileURLWithPath: presetPath))
|
||||
|
||||
Reference in New Issue
Block a user