mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
SANITY: remove the existing runtime before installing
This commit is contained in:
parent
fea686c66b
commit
910aab8527
@ -407,7 +407,20 @@ public class PojavLoginActivity extends BaseActivity
|
||||
private boolean installRuntimeAutomatically(AssetManager am) {
|
||||
File rtUniversal = new File(Tools.homeJreDir+"/universal.tar.xz");
|
||||
File rtPlatformDependent = new File(Tools.homeJreDir+"/cust-bin.tar.xz");
|
||||
if(!new File(Tools.homeJreDir).exists()) new File(Tools.homeJreDir).mkdirs();
|
||||
if(!new File(Tools.homeJreDir).exists()) new File(Tools.homeJreDir).mkdirs(); else {
|
||||
//SANITY: remove the existing files
|
||||
for (File f : new File(Tools.homeJreDir).listFiles()) {
|
||||
if (f.isDirectory()){
|
||||
try {
|
||||
FileUtils.deleteDirectory(f);
|
||||
} catch(IOException e1) {
|
||||
Log.e("JREAuto","da fuq is wrong wit ur device? n2",e1);
|
||||
}
|
||||
} else{
|
||||
f.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
InputStream is;
|
||||
FileOutputStream os;
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user