mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 19:27:30 +03:00
Fix warnings in SnippetManager
This commit is contained in:
parent
ce85564792
commit
407e031e36
@ -176,7 +176,7 @@ private extension SnippetManager {
|
||||
|
||||
let defaultKey = "insertCustomTextArray"
|
||||
|
||||
guard let texts = self.defaults.stringArray(forKey: defaultKey) else { return }
|
||||
guard let texts = UserDefaults.standard.stringArray(forKey: defaultKey) else { return }
|
||||
|
||||
let shortcuts: [Int: Shortcut]
|
||||
let fileURL = URL.applicationSupportDirectory(component: "KeyBindings")
|
||||
@ -211,7 +211,7 @@ private extension SnippetManager {
|
||||
}
|
||||
|
||||
// remove old settings
|
||||
self.defaults.removeObject(forKey: defaultKey)
|
||||
UserDefaults.standard.removeObject(forKey: defaultKey)
|
||||
if fileURL.isReachable {
|
||||
try? FileManager.default.removeItem(at: fileURL)
|
||||
let parent = fileURL.deletingLastPathComponent()
|
||||
|
Loading…
Reference in New Issue
Block a user