Fix corrupted tag database file not updating
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user