mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-09 08:23:42 +01:00
Use AppConfig.appName.
This commit is contained in:
parent
a358388004
commit
7bc980cbd5
@ -36,13 +36,9 @@ private extension Platform {
|
|||||||
static func dataFolder(forApplication appName: String?) -> URL? {
|
static func dataFolder(forApplication appName: String?) -> URL? {
|
||||||
do {
|
do {
|
||||||
var dataFolder = try FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
|
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
|
return dataFolder
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user