Use AppConfig.appName.

This commit is contained in:
Brent Simmons 2024-06-30 18:04:33 -07:00
parent a358388004
commit 7bc980cbd5

View File

@ -36,13 +36,9 @@ private extension Platform {
static func dataFolder(forApplication appName: String?) -> URL? {
do {
var dataFolder = try FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
if let appName = appName ?? Bundle.main.infoDictionary?["CFBundleExecutable"] as? String {
dataFolder = dataFolder.appendingPathComponent(appName)
dataFolder = dataFolder.appendingPathComponent(AppConfig.appName)
try FileManager.default.createDirectory(at: dataFolder, withIntermediateDirectories: true, attributes: nil)
}
return dataFolder
} catch {