From 7bc980cbd594d4f685f16df089ba50aa155c99b5 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 30 Jun 2024 18:04:33 -0700 Subject: [PATCH] Use AppConfig.appName. --- Core/Sources/Core/Platform.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Core/Sources/Core/Platform.swift b/Core/Sources/Core/Platform.swift index 0c74dba22..7dd649beb 100644 --- a/Core/Sources/Core/Platform.swift +++ b/Core/Sources/Core/Platform.swift @@ -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) + dataFolder = dataFolder.appendingPathComponent(AppConfig.appName) - if let appName = appName ?? Bundle.main.infoDictionary?["CFBundleExecutable"] as? String { - - dataFolder = dataFolder.appendingPathComponent(appName) - - try FileManager.default.createDirectory(at: dataFolder, withIntermediateDirectories: true, attributes: nil) - } + try FileManager.default.createDirectory(at: dataFolder, withIntermediateDirectories: true, attributes: nil) return dataFolder } catch {