fix: Empty “tmp-XXXXXX” directory keeps growing in cacheDir (#2194)

This commit is contained in:
kitadai31
2024-09-07 11:59:37 +09:00
committed by GitHub
parent 09fd9c4e04
commit f5a12e01bd
2 changed files with 1 additions and 9 deletions

View File

@ -109,14 +109,13 @@ class MainActivity : FlutterActivity() {
"getPatches" -> {
val patchBundleFilePath = call.argument<String>("patchBundleFilePath")!!
val cacheDirPath = call.argument<String>("cacheDirPath")!!
try {
val patchBundleFile = File(patchBundleFilePath)
patchBundleFile.setWritable(false)
patches = PatchBundleLoader.Dex(
patchBundleFile,
optimizedDexDirectory = File(cacheDirPath)
optimizedDexDirectory = codeCacheDir
)
} catch (ex: Exception) {
return@setMethodCallHandler result.notImplemented()