mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 16:16:04 -04:00
Wrong branch :trollface:
This commit is contained in:
parent
dd6a731265
commit
5df75d20d5
@ -34,21 +34,20 @@ public class PojavMigrator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean migrateGameDir(PojavLoginActivity ctx) throws IOException {
|
public static boolean migrateGameDir() throws IOException {
|
||||||
if (Build.VERSION.SDK_INT < 30) return false;
|
|
||||||
|
|
||||||
ctx.runOnUiThread(r -> {
|
|
||||||
ctx.startupTextView.setText(ctx.getString(R.string.toast_copy_home_dir, Tools.DIR_GAME_OLD, Tools.DIR_GAME_NEW));
|
|
||||||
// Toast.makeText(ctx, ctx.getString(R.string.b), Toast.LENGTH_LONG).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
File oldGameDir = new File(Tools.DIR_GAME_OLD);
|
File oldGameDir = new File(Tools.DIR_GAME_OLD);
|
||||||
|
|
||||||
if (oldGameDir.exists() && oldGameDir.isDirectory()) {
|
boolean moved = oldGameDir.exists() && oldGameDir.isDirectory();
|
||||||
FileUtils.copyDirectory(oldGameDir, new File(Tools.DIR_GAME_NEW));
|
/*
|
||||||
|
if (!migrateBugFix20201217() && moved) {
|
||||||
|
command("mv " + Tools.DIR_GAME_OLD + " " + Tools.DIR_GAME_HOME + "/");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return true;
|
if(moved) {
|
||||||
|
oldGameDir.renameTo(new File(Tools.DIR_GAME_NEW + "/"));
|
||||||
|
FileUtils.deleteDirectory(new File(Tools.DIR_GAME_NEW + "/lwjgl3"));
|
||||||
|
}
|
||||||
|
return moved;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void command(String cmd) throws IOException, InterruptedException {
|
private static void command(String cmd) throws IOException, InterruptedException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user