Ignore dotfiles when checking
This commit is contained in:
parent
71403ceb0d
commit
7b3ea76a88
2
index.js
2
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()
|
||||
|
|
Loading…
Reference in a new issue