+5
-5
lines changedFilter options
+5
-5
lines changed Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ func newEvent(name string, mask uint32, create bool) Event {
32
32
if mask&syscall.NOTE_DELETE == syscall.NOTE_DELETE {
33
33
e.Op |= Remove
34
34
}
35
-
if mask&syscall.NOTE_WRITE == syscall.NOTE_WRITE || mask&syscall.NOTE_ATTRIB == syscall.NOTE_ATTRIB {
35
+
if mask&syscall.NOTE_WRITE == syscall.NOTE_WRITE {
36
36
e.Op |= Write
37
37
}
38
38
if mask&syscall.NOTE_RENAME == syscall.NOTE_RENAME {
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ func newEvent(name string, mask uint32) Event {
28
28
if mask&syscall.IN_DELETE_SELF == syscall.IN_DELETE_SELF || mask&syscall.IN_DELETE == syscall.IN_DELETE {
29
29
e.Op |= Remove
30
30
}
31
-
if mask&syscall.IN_MODIFY == syscall.IN_MODIFY || mask&syscall.IN_ATTRIB == syscall.IN_ATTRIB {
31
+
if mask&syscall.IN_MODIFY == syscall.IN_MODIFY {
32
32
e.Op |= Write
33
33
}
34
34
if mask&syscall.IN_MOVE_SELF == syscall.IN_MOVE_SELF || mask&syscall.IN_MOVED_FROM == syscall.IN_MOVED_FROM {
Original file line number Diff line number Diff line change
@@ -916,8 +916,8 @@ func TestFsnotifyAttrib(t *testing.T) {
916
916
// We expect this event to be received almost immediately, but let's wait 500 ms to be sure
917
917
// Creating/writing a file changes also the mtime, so IsAttrib should be set to true here
918
918
time.Sleep(500 * time.Millisecond)
919
-
if modifyReceived.value() == 0 {
920
-
t.Fatal("fsnotify modify events have not received after 500 ms")
919
+
if modifyReceived.value() != 0 {
920
+
t.Fatal("received an unexpected modify event when creating a test file")
921
921
}
922
922
if attribReceived.value() == 0 {
923
923
t.Fatal("fsnotify attribute events have not received after 500 ms")
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ func newEvent(name string, mask uint32) Event {
47
47
if mask&sys_FS_DELETE == sys_FS_DELETE || mask&sys_FS_DELETE_SELF == sys_FS_DELETE_SELF {
48
48
e.Op |= Remove
49
49
}
50
-
if mask&sys_FS_MODIFY == sys_FS_MODIFY || mask&sys_FS_ATTRIB == sys_FS_ATTRIB {
50
+
if mask&sys_FS_MODIFY == sys_FS_MODIFY {
51
51
e.Op |= Write
52
52
}
53
53
if mask&sys_FS_MOVE == sys_FS_MOVE || mask&sys_FS_MOVE_SELF == sys_FS_MOVE_SELF || mask&sys_FS_MOVED_FROM == sys_FS_MOVED_FROM || mask&sys_FS_MOVED_TO == sys_FS_MOVED_TO {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4