jun7 / wyebadblock

An adblock extension for wyeb, also webkit2gtk browsers.
GNU General Public License v3.0
74 stars 6 forks source link

wyebadblock fails to find easylist.txt #1

Closed hg8i closed 5 years ago

hg8i commented 5 years ago

Hi, first of all thank you for making and sharing this great tool! I believe I found a small issue where the easylist.txt file does not get read properly.

My installation:

What I see: Testing on http://simple-adblock.com/faq/testing-your-adblocker/ both indicate "not working" with both vimb and surf.

The "solution": I copied ~/.config/wyebadblock/easylist.txt to /usr/local/share/wyebadblock/easylist.txt This seems to fix the problem, and now when I load the test page, I see "Tested OK"

I guess that something is going wrong with the g_get_user_config_dir(), but I haven't looked too deep. I may also have made a mistake. Again, thanks for sharing this! I hope this submission is helpful.

Aaron

jun7 commented 5 years ago

Thank you for reporting.

As you can see wyebab just uses g_get_user_config_dir and g_get_system_data_dirs. The your solution is in the g_get_system_data_dirs.

So what does g_get_user_config_dir return on your env? Have you changed the XDG_CONFIG_HOME of env values?

hg8i commented 5 years ago

Ah it turns out it was a typo: I changed XGD_CONFIG_HOME instead of XDG_CONFIG_HOME. The default value of XDG_CONFIG_HOME contained a tilde ~ which wasn't getting expanded, and it seemed that g_get_system_data_dirs() returned a directory relative to the current one (ie ./~/.config). Everything seems to work now.

For reference, I'm calling export XDG_CONFIG_HOME="" in a wrapper script and that seems to work. Thanks very much for helping sort this out. I think this was a mistake on my end. I'll close this.