diff --git a/backend/core/paths.js b/backend/core/paths.js index b6aa309..147bc46 100644 --- a/backend/core/paths.js +++ b/backend/core/paths.js @@ -187,9 +187,10 @@ async function getModsPath(customInstallPath = null) { } catch (e) { /* ignore */ } if (!isBrokenLink) { - // Ensure the Mods directory exists - fs.mkdirSync(modsPath, { recursive: true }); + 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 });