mirror of
https://github.com/AltarikMC/Launcher
synced 2024-11-22 06:19:50 +01:00
Fix bug where folder cannot be created
This commit is contained in:
parent
f0ed509c55
commit
ea2093b5eb
@ -132,7 +132,7 @@ class Minecraft {
|
|||||||
if(o.status === 200 && o.headers["content-type"] === "application/json") {
|
if(o.status === 200 && o.headers["content-type"] === "application/json") {
|
||||||
let folder = join(process.env.LOCALAPPDATA, "altarik-launcher", "data")
|
let folder = join(process.env.LOCALAPPDATA, "altarik-launcher", "data")
|
||||||
if(!fs.existsSync(folder))
|
if(!fs.existsSync(folder))
|
||||||
fs.mkdirSync(folder)
|
fs.mkdirSync(folder, {recursive: true})
|
||||||
let file = join(folder, "launcher.json")
|
let file = join(folder, "launcher.json")
|
||||||
if(fs.existsSync(file))
|
if(fs.existsSync(file))
|
||||||
fs.rmSync(file)
|
fs.rmSync(file)
|
||||||
|
Loading…
Reference in New Issue
Block a user