Skip to content

Commit

Permalink
fix: 快照迁移错误
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Oct 9, 2023
1 parent 241d491 commit 646fd68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/li/songe/gkd/ui/HomePageVm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class HomePageVm @Inject constructor() : ViewModel() {
}
appScope.launchTry(Dispatchers.IO) {
// 迁移快照记录
val oldDbFile = File(FolderExt.dbFolder, "snapshot.db-wal")
val oldDbFile = File(FolderExt.dbFolder, "snapshot.db")
if (oldDbFile.exists()) {
SnapshotExt.snapshotDir.walk().maxDepth(1).filter { f -> f.isDirectory }
.mapNotNull { f -> f.name.toLongOrNull() }.forEach { snapshotId ->
Expand All @@ -70,7 +70,7 @@ class HomePageVm @Inject constructor() : ViewModel() {
)
)
}
oldDbFile.exists()
oldDbFile.delete()
LogUtils.d("执行快照迁移")
}
}
Expand Down

0 comments on commit 646fd68

Please sign in to comment.