Ignore whitespace only lines in whitelist file

This commit is contained in:
Jordan Irwin 2022-09-28 10:41:19 -07:00
parent d56b25a22a
commit 7135274330
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,2 @@
TODO:
- remove empty lines from whitelist file on write

View File

@ -25,7 +25,10 @@ local function load_whitelist()
whitelist = {}
for line in file:lines() do
whitelist[line] = true
-- ignore lines with whitespace only
if line:gsub("%s+", "") ~= "" then
whitelist[line] = true
end
end
file:close()