Be less aggressive with CHMOD filesystem events
authorPedro Melo <melo@simplicidade.org>
Tue, 26 Jul 2016 20:18:15 +0000 (21:18 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 26 Jul 2016 20:18:15 +0000 (22:18 +0200)
commit3e1b579c17e3597b5a1bafd1d86f6b0b1d06ca52
tree0dce1a5a2556ac66c8b370b97b9a286b36183d29
parent91b61b976d8d32ef041506bcbc5f3ed3bf888986
Be less aggressive with CHMOD filesystem events

On 4679fbee41d3, rebuild was disabled on
CHMOD filesystem events, but the code is overly aggressive.

In some situations, specially with older Mac's (using a Late 2008
Macbook), the events we receive might be aggregated. On my
particular laptop, I get this events:

    INFO: 2016/07/26 18:08:51 hugo.go:737: Received System Events: ["<path>": WRITE|CHMOD]

These events are ignored because the code only checks for Chmod. This
commit fixes this by checking that the event is also not a Write or Create.

Related to #1587.
commands/hugo.go