mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: permanent keystore path if available (#375)
This commit is contained in:
parent
f2b03b6e69
commit
e46ad3595d
@ -18,6 +18,7 @@ class PatcherAPI {
|
||||
MethodChannel('app.revanced.manager.flutter/patcher');
|
||||
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
||||
final RootAPI _rootAPI = RootAPI();
|
||||
late Directory _dataDir;
|
||||
late Directory _tmpDir;
|
||||
late File _keyStoreFile;
|
||||
List<Patch> _patches = [];
|
||||
@ -26,8 +27,9 @@ class PatcherAPI {
|
||||
Future<void> initialize() async {
|
||||
await _loadPatches();
|
||||
Directory appCache = await getTemporaryDirectory();
|
||||
_dataDir = await getExternalStorageDirectory() ?? appCache;
|
||||
_tmpDir = Directory('${appCache.path}/patcher');
|
||||
_keyStoreFile = File('${appCache.path}/revanced-manager.keystore');
|
||||
_keyStoreFile = File('${_dataDir.path}/revanced-manager.keystore');
|
||||
cleanPatcher();
|
||||
}
|
||||
|
||||
@ -163,6 +165,7 @@ class PatcherAPI {
|
||||
integrationsFile = await _managerAPI.downloadIntegrations();
|
||||
}
|
||||
if (patchBundleFile != null) {
|
||||
_dataDir.createSync();
|
||||
_tmpDir.createSync();
|
||||
Directory workDir = _tmpDir.createTempSync('tmp-');
|
||||
File inputFile = File('${workDir.path}/base.apk');
|
||||
|
Loading…
Reference in New Issue
Block a user