Skip to content

Commit

Permalink
fixed minecraft home folder not being generated, leading to launch fa…
Browse files Browse the repository at this point in the history
…ilure
  • Loading branch information
Davis-Software committed Apr 22, 2023
1 parent 2c3c254 commit 4779968
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions back/mc-connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -95,6 +98,7 @@ function logout(){

function launchVanilla(version) {
invoke("mc:initGame")
ensureFolder()

if(!askValidate()){
refreshLogin(true).then(() => launchVanilla(version))
Expand Down Expand Up @@ -159,6 +163,7 @@ function launchVanilla(version) {

function launchModded(manifest) {
invoke("mc:initGame")
ensureFolder()

if(!askValidate()){
refreshLogin(true).then(() => launchModded(manifest))
Expand Down

0 comments on commit 4779968

Please sign in to comment.