emcrisostomo/fswatch — pull request #70 by dankeder (2014-11-12 14:40:47+00:00)
Title: Fix --include vs. --exclude precedence

Behaviour when both `--include` and `--exclude` arguments were provided was not
correct, at least according to what's in the documentation:

> ... `fswatch` processes filters this way:
> • If a path matches an including filter, the path is accepted no matter any other filter.
> • If a path matches an excluding filter, the path is rejected.
> • If a path matches no filters, the path is accepted.

This commit fixes the method `monitor::accept_path` so that for a given path it
traverses through all filters and returns:

- true if there was a matching include
- false if there was not a matching include but there was a matching exclude
- true otherwise