Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Simplify the ignore linux if statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
howeyc committed Jun 1, 2013
1 parent a1ddf48 commit c23ce3f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fsnotify_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,7 @@ func (e *FileEvent) ignoreLinux() bool {
// *Note*: this was put in place because it was seen that a MODIFY
// event was sent after the DELETE. This ignores that MODIFY and
// assumes a DELETE will come or has come if the file doesn't exist.
if !(e.mask&sys_IN_DELETE == sys_IN_DELETE ||
e.mask&sys_IN_DELETE_SELF == sys_IN_DELETE_SELF ||
e.mask&sys_IN_MOVED_FROM == sys_IN_MOVED_FROM ||
e.mask&sys_IN_MOVE_SELF == sys_IN_MOVE_SELF) {
if !(e.IsDelete() || e.IsRename()) {
if _, statErr := os.Lstat(e.Name); os.IsNotExist(statErr) {
return true
}
Expand Down

0 comments on commit c23ce3f

Please sign in to comment.