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) {
|
||||
_dataDir.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');
|
||||
|
||||
@ -182,7 +185,7 @@ class PatcherAPI {
|
||||
await patcherChannel.invokeMethod(
|
||||
'runPatcher',
|
||||
{
|
||||
'inFilePath': apkFilePath,
|
||||
'inFilePath': inApkFile.path,
|
||||
'outFilePath': outFile!.path,
|
||||
'integrationsPath': integrationsFile.path,
|
||||
'selectedPatches': selectedPatches.map((p) => p.name).toList(),
|
||||
|
Loading…
Reference in New Issue
Block a user