mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-29 21:44:26 +02:00
Use permanent path
This commit is contained in:
parent
5cc449d4fb
commit
5387fabcee
@ -367,9 +367,7 @@ class ManagerAPI {
|
|||||||
File outFile,
|
File outFile,
|
||||||
) async {
|
) async {
|
||||||
deleteLastPatchedApp();
|
deleteLastPatchedApp();
|
||||||
final Directory appCache = await getApplicationCacheDirectory();
|
app.patchedFilePath = outFile.path;
|
||||||
app.patchedFilePath =
|
|
||||||
outFile.copySync('${appCache.path}/lastPatchedApp.apk').path;
|
|
||||||
app.fileSize = outFile.lengthSync();
|
app.fileSize = outFile.lengthSync();
|
||||||
await _prefs.setString(
|
await _prefs.setString(
|
||||||
'lastPatchedApp',
|
'lastPatchedApp',
|
||||||
|
@ -182,7 +182,15 @@ class PatcherAPI {
|
|||||||
File(apkFilePath).delete();
|
File(apkFilePath).delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
outFile = File('${workDir.path}/out.apk');
|
if (_managerAPI.isLastPatchedAppEnabled()) {
|
||||||
|
// Get a random name from temp dir
|
||||||
|
// This is to avoid overwriting the last patched app
|
||||||
|
final String randomName = workDir.path.split('/')[workDir.path.split('/').length - 1];
|
||||||
|
final Directory cacheDir = await getApplicationSupportDirectory();
|
||||||
|
outFile = File('${cacheDir.path}/$randomName.apk');
|
||||||
|
} else {
|
||||||
|
outFile = File('${workDir.path}/out.apk');
|
||||||
|
}
|
||||||
|
|
||||||
final Directory tmpDir =
|
final Directory tmpDir =
|
||||||
Directory('${workDir.path}/revanced-temporary-files');
|
Directory('${workDir.path}/revanced-temporary-files');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user