Use file URL initializer for creating directory
This commit is contained in:
parent
e3eac6a9fe
commit
932d40ac92
@ -73,12 +73,10 @@ public enum DatabaseInformation {
|
||||
if let privateConnection {
|
||||
return privateConnection
|
||||
}
|
||||
if let url = URL(string: path) {
|
||||
try? FileManager.default.createDirectory(
|
||||
at: url.deletingLastPathComponent(),
|
||||
withIntermediateDirectories: true
|
||||
)
|
||||
}
|
||||
try? FileManager.default.createDirectory(
|
||||
at: URL(fileURLWithPath: path).deletingLastPathComponent(),
|
||||
withIntermediateDirectories: true
|
||||
)
|
||||
let connection = try? Connection(path)
|
||||
privateConnection = connection
|
||||
_ = try? connection?.run(table.create { table in
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user