From 477996857a5a2f204156885b4a1f54a6fa2f906c Mon Sep 17 00:00:00 2001 From: Davis-Software Date: Sat, 22 Apr 2023 19:12:21 +0200 Subject: [PATCH] fixed minecraft home folder not being generated, leading to launch failure --- back/mc-connector.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/back/mc-connector.js b/back/mc-connector.js index f0fdd4b..e4f8ad6 100644 --- a/back/mc-connector.js +++ b/back/mc-connector.js @@ -25,6 +25,9 @@ function sendRunningClients(){ } +function ensureFolder(){ + fs.mkdirSync(settings.get("mcPath"), {recursive: true}) +} function afterLaunchCalls(){ if(settings.get("minimize-while-playing")){ getMainWindow().hide() @@ -95,6 +98,7 @@ function logout(){ function launchVanilla(version) { invoke("mc:initGame") + ensureFolder() if(!askValidate()){ refreshLogin(true).then(() => launchVanilla(version)) @@ -159,6 +163,7 @@ function launchVanilla(version) { function launchModded(manifest) { invoke("mc:initGame") + ensureFolder() if(!askValidate()){ refreshLogin(true).then(() => launchModded(manifest))