From 497990905a27184aa2f3bf5de9f832f37928af86 Mon Sep 17 00:00:00 2001 From: tobspr Date: Fri, 14 Jan 2022 16:24:15 +0100 Subject: [PATCH] Change mods path --- electron/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electron/index.js b/electron/index.js index b3f75e72..c2d894f2 100644 --- a/electron/index.js +++ b/electron/index.js @@ -17,13 +17,17 @@ const roamingFolder = ? process.env.HOME + "/Library/Preferences" : process.env.HOME + "/.local/share"); let storePath = path.join(roamingFolder, "shapez.io", "saves"); -let modsPath = path.join(path.dirname(app.getPath("exe")), "mods"); +let modsPath = path.join(roamingFolder, "shapez.io", "mods"); if (!fs.existsSync(storePath)) { // No try-catch by design fs.mkdirSync(storePath, { recursive: true }); } +if (!fs.existsSync(modsPath)) { + fs.mkdirSync(modsPath, { recursive: true }); +} + /** @type {BrowserWindow} */ let win = null; let menu = null;