Add all resources, change paths
This commit is contained in:
@ -96,15 +96,11 @@ public func configure(_ app: Application) throws {
|
||||
|
||||
let configFile = URL(fileURLWithPath: app.directory.resourcesDirectory)
|
||||
.appendingPathComponent("paths.conf")
|
||||
let configData = try String(contentsOf: configFile)
|
||||
.components(separatedBy: "\n")
|
||||
.map { $0.trimmingCharacters(in: .whitespaces) }
|
||||
.filter { !$0.isEmpty }
|
||||
guard configData.count == 2 else {
|
||||
throw FestivalError.invalidConfiguration
|
||||
}
|
||||
let logFile = URL(fileURLWithPath: configData[0])
|
||||
let listDirectory = URL(fileURLWithPath: configData[1])
|
||||
let logPath = try String(contentsOf: configFile)
|
||||
.trimmingCharacters(in: .whitespaces)
|
||||
let logFile = URL(fileURLWithPath: logPath)
|
||||
let listDirectory = URL(fileURLWithPath: app.directory.publicDirectory)
|
||||
.appendingPathComponent("lists")
|
||||
|
||||
try Log.set(logFile: logFile.path)
|
||||
|
||||
|
Reference in New Issue
Block a user