mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
Add slashes to control loading paths
Java's path parser won't mind an extra slash (it wouldn't be treated as a new folder) but then paths that start with dots (such as the ones from the selector) would work fine
This commit is contained in:
parent
ca0e9e2c0d
commit
bae23f770e
@ -191,10 +191,10 @@ public class MainActivity extends BaseActivity {
|
|||||||
mControlLayout.loadLayout(
|
mControlLayout.loadLayout(
|
||||||
minecraftProfile.controlFile == null
|
minecraftProfile.controlFile == null
|
||||||
? LauncherPreferences.PREF_DEFAULTCTRL_PATH
|
? LauncherPreferences.PREF_DEFAULTCTRL_PATH
|
||||||
: Tools.CTRLMAP_PATH + minecraftProfile.controlFile);
|
: Tools.CTRLMAP_PATH + "/" + minecraftProfile.controlFile);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
try {
|
try {
|
||||||
Log.w("MainActivity", "Unable to load the control file, loading the default now");
|
Log.w("MainActivity", "Unable to load the control file, loading the default now", e);
|
||||||
mControlLayout.loadLayout(Tools.CTRLDEF_FILE);
|
mControlLayout.loadLayout(Tools.CTRLDEF_FILE);
|
||||||
} catch (IOException ioException) {
|
} catch (IOException ioException) {
|
||||||
Tools.showError(this, ioException);
|
Tools.showError(this, ioException);
|
||||||
@ -391,7 +391,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
MainActivity.mControlLayout.loadLayout(
|
MainActivity.mControlLayout.loadLayout(
|
||||||
minecraftProfile.controlFile == null
|
minecraftProfile.controlFile == null
|
||||||
? LauncherPreferences.PREF_DEFAULTCTRL_PATH
|
? LauncherPreferences.PREF_DEFAULTCTRL_PATH
|
||||||
: Tools.CTRLMAP_PATH + minecraftProfile.controlFile);
|
: Tools.CTRLMAP_PATH + "/" + minecraftProfile.controlFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Tools.showError(this,e);
|
Tools.showError(this,e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user