This is a general shoring up of the filewatcher behavior in watch mode.
As we set up our filewatcher to only watch changes from cwd we should only concern ourselves with the paths of files relative to cwd - rather than anything else in the path of the files being changed.
Additionally, our focus should be on excluding some very specific directories (and their children) - not on string fragments.
This is the result of a question I asked a few weeks back on Slack about Fornax's watch mode not working for me - which was baffling, and a glance at the (previous) code didn't show any obvious issues. But the two points ahead are overlapping safety fixes for the same root cause issue of watch mode failing for me:
I am using Fornax to generate my github.io page. So the previous watcher behavior saw laenas.github.io and would not dynamically update.
With only the first fix above, this issue might occur even more obscurely (Someone could plausibly name a watched file something like /posts/.gitignore-howto.md
With only the second fix above, it's unlikely there'd be a problem - but it still isn't inconceivable that someone works locally in something like ~/repos/.git/myfornaxsite
This is a general shoring up of the filewatcher behavior in watch mode.
cwd
we should only concern ourselves with the paths of files relative tocwd
- rather than anything else in the path of the files being changed.This is the result of a question I asked a few weeks back on Slack about Fornax's watch mode not working for me - which was baffling, and a glance at the (previous) code didn't show any obvious issues. But the two points ahead are overlapping safety fixes for the same root cause issue of watch mode failing for me: I am using Fornax to generate my
github.io
page. So the previous watcher behavior saw laenas.github.io and would not dynamically update.With only the first fix above, this issue might occur even more obscurely (Someone could plausibly name a watched file something like
/posts/.gitignore-howto.md
With only the second fix above, it's unlikely there'd be a problem - but it still isn't inconceivable that someone works locally in something like~/repos/.git/myfornaxsite