aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils.js b/src/utils.js
index 17091b4..4cdb5f5 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -271,6 +271,15 @@ const mods = {
let mods = [];
let disabled = [];
+ if (! fs.existsSync(modpath)) {
+ fs.mkdirSync(path.join(modpath + "disabled"), {recursive: true})
+ return {
+ enabled: [],
+ disabled: [],
+ all: []
+ };
+ }
+
files = fs.readdirSync(modpath)
files.forEach((file) => {
if (fs.statSync(path.join(modpath, file)).isDirectory()) {