Always attempt to clear FTS index for DB issues.

This commit is contained in:
Greyson Parrelli
2023-08-14 16:59:44 -04:00
committed by Cody Henthorne
parent 063d909572
commit 25a7560e2e

View File

@@ -39,13 +39,17 @@ class SqlCipherErrorHandler(private val databaseName: String) : DatabaseErrorHan
attemptToClearFullTextSearchIndex(db)
throw DatabaseCorruptedError_BothChecksPass(lines)
} else if (!result.pragma1Passes && result.pragma2Passes) {
attemptToClearFullTextSearchIndex(db)
throw DatabaseCorruptedError_NormalCheckFailsCipherCheckPasses(lines)
} else if (result.pragma1Passes && !result.pragma2Passes) {
attemptToClearFullTextSearchIndex(db)
throw DatabaseCorruptedError_NormalCheckPassesCipherCheckFails(lines)
} else {
attemptToClearFullTextSearchIndex(db)
throw DatabaseCorruptedError_BothChecksFail(lines)
}
} else {
attemptToClearFullTextSearchIndex(db)
throw DatabaseCorruptedError_FailedToRunChecks(lines)
}
}