From 5c7370a6b07a7914a7d16b853c3e92624849ba9d Mon Sep 17 00:00:00 2001 From: GitExample Date: Sat, 5 Feb 2022 03:41:35 +0100 Subject: fixed max mod install limit of 512mb If a mod had a file that was bigger than 512mb inside it, it'd error out, simply switching the copy-dir module to recursive-copy fixes this. --- src/utils.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/utils.js b/src/utils.js index b54808d..1456467 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,6 +1,6 @@ const path = require("path"); const fs = require("fs-extra"); -const copy = require("copy-dir"); +const copy = require("recursive-copy"); const { app, dialog, ipcMain, Notification } = require("electron"); const Emitter = require("events"); @@ -445,12 +445,7 @@ const mods = { fs.statSync(path.join(mod, "mod.json")).isFile()) { let modname = mod.replace(/^.*(\\|\/|\:)/, ""); - copy.sync(mod, path.join(modpath, modname), { - mode: true, - cover: true, - utimes: true, - }); - + copy(mod, path.join(modpath, modname)) ipcMain.emit("installedmod", "", modname); return installed(); -- cgit v1.2.3