From: Chris Howey Date: Sat, 1 Jun 2013 21:45:05 +0000 (-0500) Subject: Simplify the ignore linux if statement. X-Git-Tag: v1.7.2~351 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=c23ce3f7d9ad8bcbaee97c99427f5d03b765c848;p=fsnotify.git Simplify the ignore linux if statement. --- diff --git a/fsnotify_linux.go b/fsnotify_linux.go index 0714e12..a71f0b3 100644 --- a/fsnotify_linux.go +++ b/fsnotify_linux.go @@ -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 }