Improve android AutoBackup support

This commit is contained in:
Koitharu
2022-04-05 07:40:00 +03:00
parent b916d4016e
commit f2175b40c0
8 changed files with 150 additions and 30 deletions

View File

@@ -1,6 +1,5 @@
package org.koitharu.kotatsu.utils
import androidx.annotation.CheckResult
import androidx.annotation.WorkerThread
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runInterruptible
@@ -44,7 +43,6 @@ open class MutableZipFile(val file: File) {
dir.deleteRecursively()
}
@CheckResult
suspend fun flush(): Boolean = runInterruptible(Dispatchers.IO) {
val tempFile = File(file.path + ".tmp")
if (tempFile.exists()) {