Skip to content

Commit

Permalink
refactor codes
Browse files Browse the repository at this point in the history
  • Loading branch information
lyt122 committed Jul 16, 2024
1 parent c879870 commit ac85bd9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugins/pkg/file/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,8 @@ func (w *Watcher) Start(onChanged func()) {
for {
select {
case event := <-w.watcher.Events:
if event.Op&fsnotify.Chmod != 0 {
event.Op &= ^fsnotify.Chmod // Remove the Chmod bit
if event.Op == 0 {
continue // Skip if it was only a Chmod event
}
if event.Op == fsnotify.Chmod {
continue // Skip chmod event

Check warning on line 85 in plugins/pkg/file/fs.go

View check run for this annotation

Codecov / codecov/patch

plugins/pkg/file/fs.go#L85

Added line #L85 was not covered by tests
}
absPath, err := filepath.Abs(event.Name)
if err != nil {
Expand Down

0 comments on commit ac85bd9

Please sign in to comment.