From 6b878980dcd77ef5245bd4c84dfef069b4d5760f Mon Sep 17 00:00:00 2001 From: Teddy Sommavilla Date: Tue, 22 Apr 2025 11:40:56 +0200 Subject: [PATCH] refactor(fsnotifyext): use Event.Has to check for chmod operations As recommended by the Event.Op godoc. Op is a bitmask, and some systems may send multiple operations at once --- internal/fsnotifyext/fsnotify_dedup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/fsnotifyext/fsnotify_dedup.go b/internal/fsnotifyext/fsnotify_dedup.go index def9b6c7..d0818423 100644 --- a/internal/fsnotifyext/fsnotify_dedup.go +++ b/internal/fsnotifyext/fsnotify_dedup.go @@ -32,7 +32,7 @@ func (d *Deduper) GetChan() <-chan fsnotify.Event { switch { case !ok: return - case event.Op == fsnotify.Chmod: + case event.Has(fsnotify.Chmod): continue }