mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
fix: Copy APK to working directory before trying to write to it
This commit is contained in:
parent
ca365bac6e
commit
5cd1cba668
1 changed files with 5 additions and 2 deletions
|
@ -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 a new issue