From fcdeab19350ad92af47e10333b6dfd03eb138d3a Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com> Date: Wed, 23 Dec 2020 20:35:56 +0700 Subject: [PATCH] [Account manager] Fix parsing problem --- .../main/java/net/kdt/pojavlaunch/PojavLoginActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java index 170b41d75..73470acf5 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java @@ -823,12 +823,13 @@ public class PojavLoginActivity extends BaseActivity private void playProfile(boolean notOnLogin) { if (mProfile != null) { try { - String profilePath = null; + String profileName = null; 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) { Tools.showError(this, e); }