(Fix) autofill / extensions and restore persistent storage location (#686)

This commit is contained in:
Allan Feldman 2025-02-26 23:40:07 -05:00 committed by GitHub
parent 4ceed65182
commit cb8305f014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -25,10 +25,13 @@ public class PersistenceController {
description?.shouldInferMappingModelAutomatically = false
if isUnitTest {
description?.url = URL(fileURLWithPath: "/dev/null")
} else {
description?.url = URL(fileURLWithPath: Globals.dbPath)
}
setup()
}
public func setup() {
func setup() {
container.loadPersistentStores { _, error in
if error != nil {
self.reinitializePersistentStore()