From dce0f68e7f9095ffa400112f03968251999a92dc Mon Sep 17 00:00:00 2001 From: 0neGal Date: Mon, 3 Jan 2022 23:17:22 +0100 Subject: fixed error when disabled isn't created --- src/utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils.js b/src/utils.js index 5206226..5be9cfe 100644 --- a/src/utils.js +++ b/src/utils.js @@ -198,6 +198,10 @@ const mods = { }) let disabledPath = path.join(modpath, "disabled") + if (! fs.existsSync(disabledPath)) { + fs.mkdirSync(disabledPath) + } + files = fs.readdirSync(disabledPath) files.forEach((file) => { if (fs.statSync(path.join(disabledPath, file)).isDirectory()) { -- cgit v1.2.3