File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Modules/Sources/Storage/GRDB Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public protocol GRDBDatabaseConnection: DatabaseReader & DatabaseWriter {}
99
1010public final class GRDBManager : GRDBManagerProtocol {
1111
12- public var databaseConnection : GRDBDatabaseConnection
12+ public let databaseConnection : GRDBDatabaseConnection
1313
1414 public init ( databasePath: String ) throws {
1515 let databaseURL = URL ( fileURLWithPath: databasePath)
Original file line number Diff line number Diff line change @@ -205,7 +205,12 @@ final class ServiceLocator {
205205
206206 guard let grdbManager = _grdbManager else {
207207 do {
208- let documentsPath = FileManager . default. urls ( for: . documentDirectory, in: . userDomainMask) . first!
208+ guard let documentsPath = FileManager . default. urls (
209+ for: . documentDirectory,
210+ in: . userDomainMask) . first else {
211+ fatalError ( " Failed to get the path to the documents directory. " )
212+ }
213+
209214 let databasePath = documentsPath. appendingPathComponent ( WooConstants . localSQLiteDatabaseName) . path
210215 let manager = try GRDBManager ( databasePath: databasePath)
211216 DDLogInfo ( " Started GRDBManager with database path: \( databasePath) " )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public enum WooConstants {
1515
1616 /// Local SQLite Database Name
1717 ///
18- static let localSQLiteDatabaseName = " woo-local.db "
18+ static let localSQLiteDatabaseName = " woo-local.sqlite "
1919
2020 /// Keychain Access's Service Name
2121 ///
You can’t perform that action at this time.
0 commit comments