From 0e674d6488e7a5621ed89e22e7ac26f469f15d88 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 2 Jul 2024 21:45:43 -0700 Subject: [PATCH] =?UTF-8?q?Force=20try=20in=20dataFolder=20=E2=80=94=C2=A0?= =?UTF-8?q?if=20we=20can=E2=80=99t=20get=20the=20dataFolder,=20we=20need?= =?UTF-8?q?=20to=20stop=20running.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Sources/Core/AppConfig.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Sources/Core/AppConfig.swift b/Core/Sources/Core/AppConfig.swift index fd4c482cc..4b40d826c 100644 --- a/Core/Sources/Core/AppConfig.swift +++ b/Core/Sources/Core/AppConfig.swift @@ -36,10 +36,10 @@ public final class AppConfig { public static let dataFolder: URL = { #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) - try FileManager.default.createDirectory(at: dataFolder, withIntermediateDirectories: true, attributes: nil) + try! FileManager.default.createDirectory(at: dataFolder, withIntermediateDirectories: true, attributes: nil) return dataFolder #elseif os(iOS)