gaenserich / hostsblock

an ad- and malware-blocking script for Linux

Home Page:https://github.com/gaenserich/hostsblock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blacklisted entries are alternatively removed or added every other update

bjauy opened this issue · comments

commented

I've noticed that after update to 0.999.8 hostsblock started to randomly bypass some of the entries added to blacklist.

It looks like these lines:

grep -Fqx "$redirecturl $_blacklistline" "$hostsfile" || \
printf %s\\n "$redirecturl $_blacklistline" >> "$hostsfile".new

add only entries from black.list which weren't included in previous version.

Shouldn't grep search in .new file instead?

Indeed it should read .new. Fixed in d14ec99