aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-01-03 23:17:22 +0100
committer0neGal <mail@0negal.com>2022-01-03 23:17:22 +0100
commitdce0f68e7f9095ffa400112f03968251999a92dc (patch)
treebf2987b0042433a165b9e340141e094464cf6611
parent507953b680546b336082e6d49cbe0c38853b75e9 (diff)
downloadViper-dce0f68e7f9095ffa400112f03968251999a92dc.tar.gz
Viper-dce0f68e7f9095ffa400112f03968251999a92dc.zip
fixed error when disabled isn't created
-rw-r--r--src/utils.js4
1 files changed, 4 insertions, 0 deletions
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()) {