1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-23 12:05:44 +01:00

Add null check to xdgFolderName. Fixes Linux fail to launch.

This commit is contained in:
Andy Kish 2024-06-23 10:15:21 -04:00
parent d197bc80cc
commit 7ad438daa0

View File

@ -199,7 +199,7 @@ public class Bootstrap {
File dotFolder = new File(System.getProperty("user.home"), getProperties().getProperty("homeFolder"));
String xdgFolderName = getProperties().getProperty("homeFolderLinux");
if (osName.contains("linux") && !dotFolder.exists() && !xdgFolderName.isEmpty()) {
if (osName.contains("linux") && !dotFolder.exists() && xdgFolderName != null && !xdgFolderName.isEmpty()) {
String xdgDataHome = System.getenv("XDG_DATA_HOME");
if (xdgDataHome.isEmpty()) {
xdgDataHome = System.getProperty("user.home") + "/.local/share";