1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 12:40:56 +00:00

Merge pull request #1133 from pi-hole/fix/gravity_collapse

Make sure to read all lines of adlists file
This commit is contained in:
Mcat12 2017-01-13 17:11:33 -05:00 committed by GitHub
commit d8bcbdadd6

View File

@ -76,7 +76,7 @@ gravity_collapse() {
#custom file found, use this instead of default
echo -n "::: Custom adList file detected. Reading..."
sources=()
while read -r line; do
while IFS= read -r line || [[ -n "$line" ]]; do
#Do not read commented out or blank lines
if [[ ${line} = \#* ]] || [[ ! ${line} ]]; then
echo "" > /dev/null
@ -89,7 +89,7 @@ gravity_collapse() {
#no custom file found, use defaults!
echo -n "::: No custom adlist file detected, reading from default file..."
sources=()
while read -r line; do
while IFS= read -r line || [[ -n "$line" ]]; do
#Do not read commented out or blank lines
if [[ ${line} = \#* ]] || [[ ! ${line} ]]; then
echo "" > /dev/null