fix: Fix multiple APK shares

This commit is contained in:
Alberto Ponces 2022-09-19 01:45:24 +01:00
parent 2f14746124
commit 9405334a7d

View File

@ -199,10 +199,9 @@ class PatcherAPI {
String prefix = appName.toLowerCase().replaceAll(' ', '-');
String newName = '$prefix-revanced_v$version.apk';
int lastSeparator = _outFile!.path.lastIndexOf('/');
File share = _outFile!.renameSync(
_outFile!.path.substring(0, lastSeparator + 1) + newName,
);
ShareExtend.share(share.path, 'file');
String newPath = _outFile!.path.substring(0, lastSeparator + 1) + newName;
File shareFile = _outFile!.copySync(newPath);
ShareExtend.share(shareFile.path, 'file');
}
}