mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-22 22:19:29 +02:00
Change recursion
This commit is contained in:
@@ -344,7 +344,7 @@ class AppsProvider with ChangeNotifier {
|
|||||||
{bool silent = false}) async {
|
{bool silent = false}) async {
|
||||||
try {
|
try {
|
||||||
var somethingInstalled = false;
|
var somethingInstalled = false;
|
||||||
for (var file in dir.extracted.listSync(recursive: true, followLinks: true).whereType<File>()) {
|
for (var file in dir.extracted.listSync(recursive: true, followLinks: false).whereType<File>()) {
|
||||||
if (file.path.toLowerCase().endsWith('.apk')) {
|
if (file.path.toLowerCase().endsWith('.apk')) {
|
||||||
somethingInstalled = somethingInstalled ||
|
somethingInstalled = somethingInstalled ||
|
||||||
await installApk(DownloadedApk(dir.appId, file), silent: silent);
|
await installApk(DownloadedApk(dir.appId, file), silent: silent);
|
||||||
@@ -396,7 +396,7 @@ class AppsProvider with ChangeNotifier {
|
|||||||
// REQUEST_INSTALL_PACKAGES is required to access Android/obb
|
// REQUEST_INSTALL_PACKAGES is required to access Android/obb
|
||||||
// But it seems impossible to check if obb access has been explicitly granted
|
// But it seems impossible to check if obb access has been explicitly granted
|
||||||
String obbDirPath = "/storage/emulated/0/Android/obb/$appId";
|
String obbDirPath = "/storage/emulated/0/Android/obb/$appId";
|
||||||
Directory(obbDirPath).createSync();
|
Directory(obbDirPath).createSync(recursive: true);
|
||||||
|
|
||||||
String obbFileName = file.path.split("/").last;
|
String obbFileName = file.path.split("/").last;
|
||||||
await file.copy("$obbDirPath/$obbFileName");
|
await file.copy("$obbDirPath/$obbFileName");
|
||||||
|
Reference in New Issue
Block a user