aboutsummaryrefslogtreecommitdiff
path: root/src/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js
index d1cc345..b54808d 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -444,12 +444,15 @@ const mods = {
if (fs.existsSync(path.join(mod, "mod.json")) &&
fs.statSync(path.join(mod, "mod.json")).isFile()) {
- copy.sync(mod, path.join(modpath, mod.replace(/^.*(\\|\/|\:)/, "")), {
+ let modname = mod.replace(/^.*(\\|\/|\:)/, "");
+ copy.sync(mod, path.join(modpath, modname), {
mode: true,
cover: true,
utimes: true,
});
+ ipcMain.emit("installedmod", "", modname);
+
return installed();
} else {
files = fs.readdirSync(mod);