mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-21 00:49:49 +01:00
stabilize NSProgress when lightweight migration falls back to InferredMappingModel
This commit is contained in:
@@ -42,7 +42,10 @@ internal final class MigrationManager: NSMigrationManager, ProgressReporting {
|
||||
return
|
||||
}
|
||||
let progress = self.progress
|
||||
progress.completedUnitCount = Int64(Float(progress.totalUnitCount) * self.migrationProgress)
|
||||
progress.completedUnitCount = max(
|
||||
progress.completedUnitCount,
|
||||
Int64(Float(progress.totalUnitCount) * self.migrationProgress)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user