mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 11:42:22 +08:00
fix: 快照迁移错误
This commit is contained in:
parent
241d491a49
commit
646fd68d68
|
@ -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 ->
|
||||
|
@ -70,7 +70,7 @@ class HomePageVm @Inject constructor() : ViewModel() {
|
|||
)
|
||||
)
|
||||
}
|
||||
oldDbFile.exists()
|
||||
oldDbFile.delete()
|
||||
LogUtils.d("执行快照迁移")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user