Skip to content

Commit

Permalink
fix inverted logic
Browse files Browse the repository at this point in the history
  • Loading branch information
blotus committed Mar 8, 2024
1 parent 53fb10a commit 07784e4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/acquisition/modules/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ func (f *FileSource) StreamingAcquisition(out chan types.Event, t *tomb.Tomb) er

inotifyPoll := true
if f.config.PollWithoutInotify != nil {
inotifyPoll = *f.config.PollWithoutInotify
//The config directive is set to true to disable, so invert it
inotifyPoll = !*f.config.PollWithoutInotify
} else {
networkFS, fsType, err := types.IsNetworkFS(file)
if err != nil {
Expand Down Expand Up @@ -450,10 +451,11 @@ func (f *FileSource) monitorNewFiles(out chan types.Event, t *tomb.Tomb) error {

inotifyPoll := true
if f.config.PollWithoutInotify != nil {
inotifyPoll = *f.config.PollWithoutInotify
//The config directive is set to true to disable, so invert it
inotifyPoll = !*f.config.PollWithoutInotify
} else {
if f.config.PollWithoutInotify != nil {
inotifyPoll = *f.config.PollWithoutInotify
inotifyPoll = !*f.config.PollWithoutInotify
} else {
networkFS, fsType, err := types.IsNetworkFS(event.Name)
if err != nil {
Expand Down

0 comments on commit 07784e4

Please sign in to comment.