(__filter && (g_str_has_prefix (__filter, "http") \
|| g_str_has_prefix (__filter, "file")))
#define ADBLOCK_FILTER_SET(__filter,__active) \
- filter[4] = __active ? (__filter[5] == ':' ? 's' : ':') : '-'
+ __filter[4] = __active ? (__filter[5] == ':' ? 's' : ':') : '-'
#define ADBLOCK_FILTER_IS_SET(__filter) \
- filter[4] != '-'
+ (__filter[4] != '-' && __filter[5] != '-')
#ifdef G_ENABLE_DEBUG
#define adblock_debug(dmsg, darg1, darg2) \
do { if (debug == 1) g_debug (dmsg, darg1, darg2); } while (0)
gchar* folder;
gchar* path;
- if (strchr (uri + 4,'-'))
+ if (!ADBLOCK_FILTER_IS_SET (uri))
return NULL;
if (!strncmp (uri, "file", 4))