(Fix) autofill / extensions and restore persistent storage location (#686)
This commit is contained in:
parent
4ceed65182
commit
cb8305f014
3 changed files with 4 additions and 3 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue