agrosner / agrosner/DBFlow

Restore Backup not working

オープン
#1,710 コメント 0 件 リアクション 0 件 担当者 1 名 @agrosner が担当を希望しています GitHub で見る
bug
主要言語
Kotlin
スター
4.8k
フォーク
593
平均マージ
1分
マージ済み PR(30日)
1

説明

DBFlow Version: 4.2.4

Bug Request:
When database is corrupted in way that integrity check returns not ok restore db doesn't work.

Description:
In DatabaseHelperDelegate.restoreBackup there is a bug related to get proper file names. Instead of X.getDatabaseName() inside FlowManager.getContext().getDatabasePath() there should be X.getDatabaseFileName()

also, I think temp database name should contains the same extention and code needs changes:

public static String getTempDbFileName(DatabaseDefinition databaseDefinition) {
return TEMP_DB_NAME + databaseDefinition.getDatabaseName() + databaseDefinition.getDatabaseExtensionName();
}

and last thing. In restoreBackup system should close database before file copy. In other case after reopen there will be a problem with still opened corrupted db.

Kind regards, Krzysztof

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。