Skip to content

Commit a9965e8

Browse files
committed
Always ensure config directory on daemon start
1 parent bf71a4e commit a9965e8

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

linkdaemon/Classes/ConfigDirectory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66
struct ConfigDirectory {
77
// MARK: Class Methods
88

9-
static func create() {
9+
static func ensure() {
1010
ensureDirectory()
1111
ensureDirectoryPermissions()
1212
ensureFile()

linkdaemon/Classes/Listener.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ extension Listener: ListenerProtocol {
8888
// Log.debug("now!")
8989
// Log.debug(uncachedBundle.infoDictionary?["CFBundleShortVersionString"]! as! String)
9090

91-
ConfigDirectory.create()
91+
ConfigDirectory.ensure()
9292
reply(true)
9393
}
9494

linkdaemon/LinkDaemon.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class LinkDaemon {
2424
// MARK: Private Instance Methods
2525

2626
private func subscribe() {
27+
ConfigDirectory.ensure()
28+
2729
// Start observing the config file.
2830
configFileObserver = FileObserver(path: Paths.configFile, callback: configFileChanged)
2931

0 commit comments

Comments
 (0)