]> go.fuhry.dev Git - fsnotify.git/commitdiff
Simplify the ignore linux if statement.
authorChris Howey <chris@howey.me>
Sat, 1 Jun 2013 21:45:05 +0000 (16:45 -0500)
committerChris Howey <chris@howey.me>
Sat, 1 Jun 2013 21:45:05 +0000 (16:45 -0500)
fsnotify_linux.go

index 0714e12bbf6bea12c607ff4a3618914072f5239e..a71f0b3af832143ec61d43a3280be5e607eeac4d 100644 (file)
@@ -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
                }