File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ final public class CoreDataWrapper {
140140 case . sqlite: debugPrint ( " \( self . storeType) " ) ; fallthrough
141141 case . binary:
142142 if let storeURL = self . storeURL {
143- storeDescription. url = storeURL
143+ let dbFileNameWithExt = self . databaseFileName + self . storeType. getStoreFileExt ( )
144+ storeDescription. url = storeURL. appendingPathComponent ( dbFileNameWithExt)
144145 } else {
145146 storeDescription. url = self . storeFullURL
146147 self . storeURL = self . storeFullURL
@@ -170,6 +171,7 @@ final public class CoreDataWrapper {
170171 @available ( iOS 12 . 0 , macOS 10 . 13 , * )
171172 final public func saveMainContext( isSync: Bool ,
172173 completion: ( ( Bool ) -> Void ) ? ) {
174+ debugPrint ( " called \( #function) at = \( Date ( ) ) " )
173175 let saveChangesBlock = {
174176 if self . mainContext. hasChanges {
175177 do {
@@ -193,6 +195,7 @@ final public class CoreDataWrapper {
193195 final public func saveBGContext( context: NSManagedObjectContext ,
194196 isSync: Bool ,
195197 completion: ( ( Bool ) -> Void ) ? ) {
198+ debugPrint ( " called \( #function) at = \( Date ( ) ) " )
196199 let saveChangesBlock = {
197200 if context. hasChanges {
198201 do {
You can’t perform that action at this time.
0 commit comments