only read files end with json
This commit is contained in:
parent
f8e47879f1
commit
2dbcab998f
@ -79,6 +79,7 @@ exports.getGlobalConfig = function () {
|
||||
exports.getConfigs = function () {
|
||||
try {
|
||||
var configsList = fs.readdirSync("configs");
|
||||
configsList = configsList.filter((file) => file.endsWith(".json"));
|
||||
} catch (e) {
|
||||
if (
|
||||
e == "Error: ENOENT: no such file or directory, scandir 'configs'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user