mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
Force try in dataFolder — if we can’t get the dataFolder, we need to stop running.
This commit is contained in:
parent
364da4e3cf
commit
0e674d6488
@ -36,10 +36,10 @@ public final class AppConfig {
|
|||||||
public static let dataFolder: URL = {
|
public static let dataFolder: URL = {
|
||||||
|
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
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(appName)
|
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
|
||||||
|
|
||||||
#elseif os(iOS)
|
#elseif os(iOS)
|
||||||
|
Loading…
Reference in New Issue
Block a user