mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 13:05:37 +02:00
fix: npe when loading patch bundle on android 8
This commit is contained in:
parent
d2b09936d1
commit
0bfa776ce7
2 changed files with 12 additions and 1 deletions
|
@ -306,12 +306,20 @@ 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 patchesObject = await PatcherAPI.patcherChannel.invokeMethod(
|
||||
'getPatches',
|
||||
{
|
||||
'patchBundleFilePath': patchBundleFile.path,
|
||||
'cacheDirPath': cacheDir.path,
|
||||
},
|
||||
);
|
||||
final List<Map<String, dynamic>> patchesMap = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue