mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-11-04 07:13:28 +01:00 
			
		
		
		
	fix race condition
This commit is contained in:
		@@ -350,7 +350,7 @@ class AppsProvider with ChangeNotifier {
 | 
				
			|||||||
              await installApk(DownloadedApk(dir.appId, file), silent: silent);
 | 
					              await installApk(DownloadedApk(dir.appId, file), silent: silent);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (file.path.toLowerCase().endsWith('.obb')) {
 | 
					        else if (file.path.toLowerCase().endsWith('.obb')) {
 | 
				
			||||||
          moveObbFile(file, dir.appId);
 | 
					          await moveObbFile(file, dir.appId);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (somethingInstalled) {
 | 
					      if (somethingInstalled) {
 | 
				
			||||||
@@ -390,7 +390,7 @@ class AppsProvider with ChangeNotifier {
 | 
				
			|||||||
    return installed;
 | 
					    return installed;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void moveObbFile(File file, String appId) async {
 | 
					  Future<void> moveObbFile(File file, String appId) async {
 | 
				
			||||||
    if(!file.path.toLowerCase().endsWith('.obb')) return;
 | 
					    if(!file.path.toLowerCase().endsWith('.obb')) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TODO: Does not support Android 11+
 | 
					    // TODO: Does not support Android 11+
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user