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');
|
MethodChannel('app.revanced.manager.flutter/patcher');
|
||||||
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
||||||
final RootAPI _rootAPI = RootAPI();
|
final RootAPI _rootAPI = RootAPI();
|
||||||
|
late Directory _dataDir;
|
||||||
late Directory _tmpDir;
|
late Directory _tmpDir;
|
||||||
late File _keyStoreFile;
|
late File _keyStoreFile;
|
||||||
List<Patch> _patches = [];
|
List<Patch> _patches = [];
|
||||||
@ -26,8 +27,9 @@ class PatcherAPI {
|
|||||||
Future<void> initialize() async {
|
Future<void> initialize() async {
|
||||||
await _loadPatches();
|
await _loadPatches();
|
||||||
Directory appCache = await getTemporaryDirectory();
|
Directory appCache = await getTemporaryDirectory();
|
||||||
|
_dataDir = await getExternalStorageDirectory() ?? appCache;
|
||||||
_tmpDir = Directory('${appCache.path}/patcher');
|
_tmpDir = Directory('${appCache.path}/patcher');
|
||||||
_keyStoreFile = File('${appCache.path}/revanced-manager.keystore');
|
_keyStoreFile = File('${_dataDir.path}/revanced-manager.keystore');
|
||||||
cleanPatcher();
|
cleanPatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,6 +165,7 @@ class PatcherAPI {
|
|||||||
integrationsFile = await _managerAPI.downloadIntegrations();
|
integrationsFile = await _managerAPI.downloadIntegrations();
|
||||||
}
|
}
|
||||||
if (patchBundleFile != null) {
|
if (patchBundleFile != null) {
|
||||||
|
_dataDir.createSync();
|
||||||
_tmpDir.createSync();
|
_tmpDir.createSync();
|
||||||
Directory workDir = _tmpDir.createTempSync('tmp-');
|
Directory workDir = _tmpDir.createTempSync('tmp-');
|
||||||
File inputFile = File('${workDir.path}/base.apk');
|
File inputFile = File('${workDir.path}/base.apk');
|
||||||
|
Loading…
Reference in New Issue
Block a user