Fix corrupted tag database file not updating

This commit is contained in:
FooIbar committed 2025-07-17 19:21:05 +08:00
1 parent db86fef717
commit cb5455c990
1 file changed
+5 -3
@@ -177,9 +177,11 @@ object EhTagDatabase : CoroutineScope {
}
}
val currentSha1 = Either.catch {
sha1File.utf8()
}.getOrNull()
val currentSha1 = if (initialized) {
Either.catch { sha1File.utf8() }.getOrNull()
} else {
null
}
val newSha1 = fetch(sha1Url)
if (newSha1 == currentSha1) return