From ea2093b5eb2da4686e265bc3d74645b1c00d7e50 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 22 Feb 2022 13:25:53 +0100 Subject: [PATCH] Fix bug where folder cannot be created --- src/server/minecraft.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/minecraft.js b/src/server/minecraft.js index e61379b..f364234 100644 --- a/src/server/minecraft.js +++ b/src/server/minecraft.js @@ -132,7 +132,7 @@ class Minecraft { if(o.status === 200 && o.headers["content-type"] === "application/json") { let folder = join(process.env.LOCALAPPDATA, "altarik-launcher", "data") if(!fs.existsSync(folder)) - fs.mkdirSync(folder) + fs.mkdirSync(folder, {recursive: true}) let file = join(folder, "launcher.json") if(fs.existsSync(file)) fs.rmSync(file)