From c23ce3f7d9ad8bcbaee97c99427f5d03b765c848 Mon Sep 17 00:00:00 2001 From: Chris Howey Date: Sat, 1 Jun 2013 16:45:05 -0500 Subject: [PATCH] Simplify the ignore linux if statement. --- fsnotify_linux.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 }