[Account manager] Fix parsing problem

This commit is contained in:
Duy Tran Khanh 2020-12-23 20:35:56 +07:00 committed by GitHub
parent 6675c57948
commit fcdeab1935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -823,12 +823,13 @@ public class PojavLoginActivity extends BaseActivity
private void playProfile(boolean notOnLogin) { private void playProfile(boolean notOnLogin) {
if (mProfile != null) { if (mProfile != null) {
try { try {
String profilePath = null; String profileName = null;
if (sRemember.isChecked() || notOnLogin) { if (sRemember.isChecked() || notOnLogin) {
profilePath = mProfile.save(); profileName = new File(mProfile.save()).getName();
} }
profileName = profileName.substring(0, profileName.length() - 5);
MCProfile.launch(PojavLoginActivity.this, profilePath == null ? mProfile : profilePath); MCProfile.launch(PojavLoginActivity.this, profileName == null ? mProfile : profileName);
} catch (IOException e) { } catch (IOException e) {
Tools.showError(this, e); Tools.showError(this, e);
} }