Fix unconverted version go to run

This commit is contained in:
khanhduytran0 2020-03-31 12:16:59 +07:00
parent 420d9af8b2
commit 125e2f4a5e

View File

@ -600,11 +600,8 @@ public class MCLauncherActivity extends AppCompatActivity
publishProgress("5", getStr(R.string.mcl_launch_download_client) + p1[0]); publishProgress("5", getStr(R.string.mcl_launch_download_client) + p1[0]);
outUnpatchedConvert = new File(unpatchedPath); outUnpatchedConvert = new File(unpatchedPath);
boolean patchedExist = new File(patchedFile).exists(); boolean patchedExist = new File(patchedFile).exists();
System.out.println("PATCHED:" + patchedFile + ",exist:" + Boolean.toString(patchedExist));
if (!patchedExist) { if (!patchedExist) {
System.out.println("UNPATCHED:" + outUnpatchedConvert + ",exist:" + Boolean.toString(outUnpatchedConvert.exists()));
if (!outUnpatchedConvert.exists()) { if (!outUnpatchedConvert.exists()) {
System.out.println("INPUT:" + inputPath + ",exist:" + Boolean.toString(new File(inputPath).exists()));
if (!new File(inputPath).exists()) { if (!new File(inputPath).exists()) {
currentLog.setLength(0); currentLog.setLength(0);
@ -613,6 +610,7 @@ public class MCLauncherActivity extends AppCompatActivity
inputPath, inputPath,
true true
); );
}
convertStr = getStr(R.string.mcl_launch_convert_client, p1[0]); convertStr = getStr(R.string.mcl_launch_convert_client, p1[0]);
publishProgress("5", convertStr); publishProgress("5", convertStr);
@ -635,7 +633,6 @@ public class MCLauncherActivity extends AppCompatActivity
patchAndCleanJar(p1[0], outUnpatchedConvert.getAbsolutePath(), patchedFile); patchAndCleanJar(p1[0], outUnpatchedConvert.getAbsolutePath(), patchedFile);
outUnpatchedConvert.delete(); outUnpatchedConvert.delete();
}
} else { } else {
patchAndCleanJar(p1[0], outUnpatchedConvert.getAbsolutePath(), patchedFile); patchAndCleanJar(p1[0], outUnpatchedConvert.getAbsolutePath(), patchedFile);
outUnpatchedConvert.delete(); outUnpatchedConvert.delete();