Repos / s4g / 194280c33c
commit 194280c33cef344feb6281a3dc3d36926944784a
Author: Nhân <hi@imnhan.com>
Date: Sun Jul 9 13:18:41 2023 +0700
add note on fsnotify not telling dir from file
diff --git a/main.go b/main.go
index abaadff..7b8f9ad 100644
--- a/main.go
+++ b/main.go
@@ -43,7 +43,8 @@ func main() {
// - Devise some sort of dependency graph
// - Filter out relevant FS events: this seems daunting considering the
// differences between OSes and applications (e.g. vim writes to temp file
- // then renames)
+ // then renames), and fsnotify's inability to tell if the event came from a
+ // directory.
closeWatcher := WatchLocalFS(fsys, func() {
fmt.Println("Change detected. Regenerating...")
regenerate(fsys)