From 7b3ea76a88f1453e856a542c488d4b9ef6b4d111 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Mon, 22 Jul 2024 12:30:54 -0600 Subject: [PATCH] Ignore dotfiles when checking --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 7cdda46..19b9f8b 100644 --- a/index.js +++ b/index.js @@ -183,6 +183,7 @@ const sendMessages = async (data) => { fs.readdirSync(process.env.CONFIG_PATH).forEach(file => { + if (file.startsWith(".")) return; // Ignore hidden files contents = fs.readFileSync(path.join(process.env.CONFIG_PATH, file)).toString() switch (file) { case "IpBans.txt": @@ -199,6 +200,7 @@ fs.readdirSync(process.env.CONFIG_PATH).forEach(file => { const watchFiles = () => { fs.watch(process.env.CONFIG_PATH, (event, file) => { + if (file.startsWith(".")) return; // Ignore hidden files setTimeout(() => { tmp = {} newContents = fs.readFileSync(path.join(process.env.CONFIG_PATH, file)).toString()