Skip to content

Commit cdcce16

Browse files
committed
Update Repositories.kt
1 parent 92929dc commit cdcce16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/src/main/java/com/absinthe/rulesbundle/Repositories.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ object Repositories {
1111
private const val LOCAL_RULES_VERSION_FILE = "lcrules/version"
1212

1313
fun checkRulesDatabase(context: Context) {
14+
if (!checkMd5(context) && !checkVersion(context)) {
15+
deleteRulesDatabase(context)
16+
}
1417
val dbFile = context.getDatabasePath(RULES_DATABASE_NAME)
1518
if (!dbFile.exists()) {
1619
// On first launch, copy the prebuilt database from assets
@@ -21,9 +24,6 @@ object Repositories {
2124
}
2225
}
2326
}
24-
if (!checkMd5(context) && !checkVersion(context)) {
25-
deleteRulesDatabase(context)
26-
}
2727
}
2828

2929
fun getLocalRulesVersion(context: Context): Int {

0 commit comments

Comments
 (0)