refactor(macos): replace FileManager.default for Swift 6
This commit is contained in:
committed by
Peter Steinberger
parent
44d55667de
commit
87d995bcde
@@ -354,7 +354,7 @@ struct DebugSettings: View {
|
||||
Button("Save") { self.saveRelayRoot() }
|
||||
.buttonStyle(.borderedProminent)
|
||||
Button("Reset") {
|
||||
let def = FileManager.default.homeDirectoryForCurrentUser
|
||||
let def = FileManager().homeDirectoryForCurrentUser
|
||||
.appendingPathComponent("Projects/clawdbot").path
|
||||
self.gatewayRootInput = def
|
||||
self.saveRelayRoot()
|
||||
@@ -743,7 +743,7 @@ struct DebugSettings: View {
|
||||
|
||||
do {
|
||||
let data = try JSONSerialization.data(withJSONObject: root, options: [.prettyPrinted, .sortedKeys])
|
||||
try FileManager.default.createDirectory(
|
||||
try FileManager().createDirectory(
|
||||
at: url.deletingLastPathComponent(),
|
||||
withIntermediateDirectories: true)
|
||||
try data.write(to: url, options: [.atomic])
|
||||
@@ -776,7 +776,7 @@ struct DebugSettings: View {
|
||||
}
|
||||
|
||||
private func configURL() -> URL {
|
||||
FileManager.default.homeDirectoryForCurrentUser
|
||||
FileManager().homeDirectoryForCurrentUser
|
||||
.appendingPathComponent(".clawdbot")
|
||||
.appendingPathComponent("clawdbot.json")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user