Skip to content

Commit

Permalink
Fix allowing a blank name in the install name
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrptonaught committed Sep 18, 2023
1 parent 785e7a9 commit 8360c24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/kyrptonaught/ToolBox/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static void installBranchMenu(BufferedReader input) {
//todo input sanitization
//todo check if server with name already installed
InstalledServerInfo serverInfo = new InstalledServerInfo(branch, branchInfo);
if (enteredServerName != null) serverInfo.setName(enteredServerName);
if (!enteredServerName.isBlank()) serverInfo.setName(enteredServerName);
serverInfo.setPath();
serverInfo.setCustomLaunchArgs("-Xmx" + allocatedRam + "G -Xms" + allocatedRam + "G");

Expand Down Expand Up @@ -249,7 +249,7 @@ public static void pressEnterToCont(BufferedReader input) {

public static String readLine(BufferedReader input) {
try {
return input.readLine();
return input.readLine().trim();
} catch (IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 8360c24

Please sign in to comment.