mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Copy APK to working directory before trying to write to it
This commit is contained in:
parent
ca365bac6e
commit
5cd1cba668
@ -171,7 +171,10 @@ class PatcherAPI {
|
|||||||
if (integrationsFile != null) {
|
if (integrationsFile != null) {
|
||||||
_dataDir.createSync();
|
_dataDir.createSync();
|
||||||
_tmpDir.createSync();
|
_tmpDir.createSync();
|
||||||
final Directory workDir = _tmpDir.createTempSync('tmp-');
|
final Directory workDir = await _tmpDir.createTemp('tmp-');
|
||||||
|
|
||||||
|
final File inApkFile = File('${workDir.path}/in.apk');
|
||||||
|
await File(apkFilePath).copy(inApkFile.path);
|
||||||
|
|
||||||
outFile = File('${workDir.path}/out.apk');
|
outFile = File('${workDir.path}/out.apk');
|
||||||
|
|
||||||
@ -182,7 +185,7 @@ class PatcherAPI {
|
|||||||
await patcherChannel.invokeMethod(
|
await patcherChannel.invokeMethod(
|
||||||
'runPatcher',
|
'runPatcher',
|
||||||
{
|
{
|
||||||
'inFilePath': apkFilePath,
|
'inFilePath': inApkFile.path,
|
||||||
'outFilePath': outFile!.path,
|
'outFilePath': outFile!.path,
|
||||||
'integrationsPath': integrationsFile.path,
|
'integrationsPath': integrationsFile.path,
|
||||||
'selectedPatches': selectedPatches.map((p) => p.name).toList(),
|
'selectedPatches': selectedPatches.map((p) => p.name).toList(),
|
||||||
|
Loading…
Reference in New Issue
Block a user