aboutsummaryrefslogtreecommitdiff
path: root/internal/watcher/fsnotify.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/watcher/fsnotify.go')
-rw-r--r--internal/watcher/fsnotify.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/watcher/fsnotify.go b/internal/watcher/fsnotify.go
index 7251907..b759c50 100644
--- a/internal/watcher/fsnotify.go
+++ b/internal/watcher/fsnotify.go
@@ -22,6 +22,8 @@ func (w *Watcher) Run(ctx context.Context) error {
_ = fswatcher.Close()
}()
+ go w.debounceLoop(ctx)
+
for _, root := range w.config.Roots {
if err := watchTree(fswatcher, root); err != nil {
return err
@@ -40,6 +42,8 @@ func (w *Watcher) Run(ctx context.Context) error {
log.Printf("watcher: %v %s", event.Op, event.Name)
+ w.notify()
+
if !event.Has(fsnotify.Create) {
continue
}