fix: remove broken symlink after detected

This commit is contained in:
Fazri Gading
2026-01-26 12:01:46 +08:00
committed by GitHub
parent 375b422c73
commit 20faf36b37

View File

@@ -187,10 +187,11 @@ async function getModsPath(customInstallPath = null) {
} catch (e) { /* ignore */ }
if (!isBrokenLink) {
fs.unlinkSync(modsPath); // Remove broken symlink
}
// Ensure the Mods directory exists
fs.mkdirSync(modsPath, { recursive: true });
}
}
if (!fs.existsSync(disabledModsPath)) {
fs.mkdirSync(disabledModsPath, { recursive: true });
}