From 8d39f2652cf8c511b039d8d6cc73ceff135a2d99 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sun, 18 Feb 2018 09:59:00 -0800 Subject: watch for all events except chmod and rebuild to handle file creation/rename/deletion --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index c938916..3cb6f57 100644 --- a/main.go +++ b/main.go @@ -93,7 +93,7 @@ func watchSite() { for { select { case event := <-watcher.Events: - if event.Op&fsnotify.Write == fsnotify.Write { + if event.Op&fsnotify.Write != fsnotify.Chmod { fmt.Printf("rebuilding... ") buildSite() fmt.Printf("done\n") -- cgit v1.2.3