Skip to content

Commit

Permalink
#5 debugging failing tailer test on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
fstab committed May 28, 2019
1 parent a1cf7bd commit 58876fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tailer/fswatcher/fswatcher_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ func (w *watcher) processEvent(t *fileTailer, event fsevent, log logrus.FieldLog
dir *Dir
file *fileWithReader
dirLogger, fileLogger logrus.FieldLogger
kevent syscall.Kevent_t
kevent Kevent
ok bool
)

kevent, ok = event.(syscall.Kevent_t)
kevent, ok = event.(Kevent)
if !ok {
return NewErrorf(NotSpecified, nil, "received a file system event of unknown type %T", event)
}
Expand All @@ -137,7 +137,7 @@ func (w *watcher) processEvent(t *fileTailer, event fsevent, log logrus.FieldLog
return nil
}

func (w *watcher) processDirEvent(t *fileTailer, kevent syscall.Kevent_t, dir *Dir, dirLogger logrus.FieldLogger) Error {
func (w *watcher) processDirEvent(t *fileTailer, kevent Kevent, dir *Dir, dirLogger logrus.FieldLogger) Error {
if kevent.Fflags&syscall.NOTE_WRITE == syscall.NOTE_WRITE || kevent.Fflags&syscall.NOTE_EXTEND == syscall.NOTE_EXTEND {
// NOTE_WRITE on the directory's fd means a file was created, deleted, or moved. This covers inotify's MOVED_TO.
// NOTE_EXTEND reports that a directory entry was added or removed as the result of rename operation.
Expand All @@ -160,7 +160,7 @@ func (w *watcher) processDirEvent(t *fileTailer, kevent syscall.Kevent_t, dir *D
return nil
}

func (w *watcher) processFileEvent(t *fileTailer, kevent syscall.Kevent_t, file *fileWithReader, log logrus.FieldLogger) Error {
func (w *watcher) processFileEvent(t *fileTailer, kevent Kevent, file *fileWithReader, log logrus.FieldLogger) Error {
var (
truncated bool
err error
Expand Down

0 comments on commit 58876fb

Please sign in to comment.