4
0
mirror of https://github.com/AltarikMC/Launcher synced 2024-11-24 06:39:50 +01:00

Remove version folder when invalidating data

This commit is contained in:
Quentin Legot 2023-11-10 23:38:52 +01:00
parent d86cbba306
commit 8d062c16bc

View File

@ -368,12 +368,15 @@ class Minecraft {
const assets = join(this.minecraftpath, "assets")
const librairies = join(this.minecraftpath,"libraries")
const natives = join(this.minecraftpath, "natives")
const versions = join(this.minecraftpath, "versions")
if(fs.existsSync(assets))
fs.rmSync(assets, { recursive: true })
if(fs.existsSync(librairies))
fs.rmSync(librairies, { recursive: true })
if(fs.existsSync(natives))
fs.rmSync(natives, { recursive: true })
if(fs.existsSync(versions))
fs.rmSync(versions, { recursive: true })
logger.info("Game data invalidated")
event.sender.send("invalidated")
}