Skip to content

Commit

Permalink
Ignore all attribute changes
Browse files Browse the repository at this point in the history
This fixes an issue on Mac OS where Spotlight makes attribute changes to
files after each change (after a small delay), triggering reflex
multiple times.

I think it's intuitive that attr changes wouldn't trigger reflex. If
this turns out not to be true, we can be more selective about ignoring
events in the future.

Fixes issue #11.
  • Loading branch information
cespare committed Apr 26, 2014
1 parent 8247234 commit 1cc5b6f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func watch(root string, watcher *fsnotify.Watcher, names chan<- string, done cha
if verbose {
infoPrintln(-1, "fsnotify event:", e)
}
if e.IsAttrib() {
continue
}
names <- path
if e.IsCreate() {
if err := filepath.Walk(path, walker(watcher)); err != nil {
Expand Down

0 comments on commit 1cc5b6f

Please sign in to comment.