Compare commits

...

2 Commits

Author SHA1 Message Date
582db18d83 chore(release): 1.22.0-dev.3 [skip ci]
# [1.22.0-dev.3](https://github.com/ReVanced/revanced-manager/compare/v1.22.0-dev.2...v1.22.0-dev.3) (2024-09-07)

### Bug Fixes

* Empty “tmp-XXXXXX” directory keeps growing in cacheDir ([#2194](https://github.com/ReVanced/revanced-manager/issues/2194)) ([f5a12e0](f5a12e01bd))
2024-09-07 03:09:04 +00:00
f5a12e01bd fix: Empty “tmp-XXXXXX” directory keeps growing in cacheDir (#2194) 2024-09-07 09:59:37 +07:00
3 changed files with 2 additions and 10 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()

View File

@ -427,19 +427,12 @@ class ManagerAPI {
return patches;
}
final File? patchBundleFile = await downloadPatches();
final Directory appCache = await getTemporaryDirectory();
Directory('${appCache.path}/cache').createSync();
final Directory workDir =
Directory('${appCache.path}/cache').createTempSync('tmp-');
final Directory cacheDir = Directory('${workDir.path}/cache');
cacheDir.createSync();
if (patchBundleFile != null) {
try {
final String patchesJson = await PatcherAPI.patcherChannel.invokeMethod(
'getPatches',
{
'patchBundleFilePath': patchBundleFile.path,
'cacheDirPath': cacheDir.path,
},
);
final List<dynamic> patchesJsonList = jsonDecode(patchesJson);

View File

@ -4,7 +4,7 @@ homepage: https://github.com/ReVanced/revanced-manager
publish_to: 'none'
version: 1.22.0-dev.2+101800035
version: 1.22.0-dev.3+101800036
environment:
sdk: '>=3.0.0 <4.0.0'