mirror of
https://github.com/revanced/revanced-manager-compose.git
synced 2025-04-30 06:14:25 +02:00
fix: run blocking IO operations in the correct context
This commit is contained in:
parent
ee715b5d22
commit
56bc4ba7f1
@ -8,6 +8,8 @@ import app.revanced.patcher.PatcherOptions
|
||||
import app.revanced.patcher.data.Context
|
||||
import app.revanced.patcher.logging.Logger
|
||||
import app.revanced.patcher.patch.Patch
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.Closeable
|
||||
import java.io.File
|
||||
import java.nio.file.Files
|
||||
@ -74,7 +76,9 @@ class Session(
|
||||
|
||||
logger.info("Patched apk saved to $aligned")
|
||||
|
||||
Files.move(aligned.toPath(), output.toPath(), StandardCopyOption.REPLACE_EXISTING)
|
||||
withContext(Dispatchers.IO) {
|
||||
Files.move(aligned.toPath(), output.toPath(), StandardCopyOption.REPLACE_EXISTING)
|
||||
}
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user