mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 20:57:36 +02:00
fix: Empty “tmp-XXXXXX” directory keeps growing in cacheDir (#2194)
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user