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 () {
|
exports.getConfigs = function () {
|
||||||
try {
|
try {
|
||||||
var configsList = fs.readdirSync("configs");
|
var configsList = fs.readdirSync("configs");
|
||||||
|
configsList = configsList.filter((file) => file.endsWith(".json"));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (
|
if (
|
||||||
e == "Error: ENOENT: no such file or directory, scandir 'configs'"
|
e == "Error: ENOENT: no such file or directory, scandir 'configs'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user