diff --git a/gravity.sh b/gravity.sh index b5a3765c..324947bf 100755 --- a/gravity.sh +++ b/gravity.sh @@ -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