summary refs log tree commit diff stats
path: root/lib/pure/fsmonitor.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/fsmonitor.nim')
-rw-r--r--lib/pure/fsmonitor.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/fsmonitor.nim b/lib/pure/fsmonitor.nim
index 83779eb9c..229df80b5 100644
--- a/lib/pure/fsmonitor.nim
+++ b/lib/pure/fsmonitor.nim
@@ -108,7 +108,7 @@ proc del*(monitor: FSMonitor, wd: cint) =
 
 proc getEvent(m: FSMonitor, fd: cint): seq[MonitorEvent] =
   result = @[]
-  let size = (sizeof(TINotifyEvent)+2000)*MaxEvents
+  let size = (sizeof(INotifyEvent)+2000)*MaxEvents
   var buffer = newString(size)
 
   let le = read(fd, addr(buffer[0]), size)
@@ -117,7 +117,7 @@ proc getEvent(m: FSMonitor, fd: cint): seq[MonitorEvent] =
 
   var i = 0
   while i < le:
-    var event = cast[ptr TINotifyEvent](addr(buffer[i]))
+    var event = cast[ptr INotifyEvent](addr(buffer[i]))
     var mev: MonitorEvent
     mev.wd = event.wd
     if event.len.int != 0:
@@ -129,7 +129,7 @@ proc getEvent(m: FSMonitor, fd: cint): seq[MonitorEvent] =
     if (event.mask.int and IN_MOVED_FROM) != 0: 
       # Moved from event, add to m's collection
       movedFrom.add(event.cookie.cint, (mev.wd, mev.name))
-      inc(i, sizeof(TINotifyEvent) + event.len.int)
+      inc(i, sizeof(INotifyEvent) + event.len.int)
       continue
     elif (event.mask.int and IN_MOVED_TO) != 0: 
       mev.kind = MonitorMoved
@@ -159,7 +159,7 @@ proc getEvent(m: FSMonitor, fd: cint): seq[MonitorEvent] =
       mev.fullname = ""
     
     result.add(mev)
-    inc(i, sizeof(TINotifyEvent) + event.len.int)
+    inc(i, sizeof(INotifyEvent) + event.len.int)
 
   # If movedFrom events have not been matched with a moveTo. File has
   # been moved to an unwatched location, emit a MonitorDelete.
5:37 -0400 committer Ben Morrison <ben@gbmor.dev> 2019-05-22 23:51:12 -0400 moved test init funcs to init_test, testing POST' href='/gbmor/getwtxt/commit/post_test.go?h=v0.4.8&id=a6c816217f09e4d462949c2631a88439886ed655'>a6c8162 ^
6f93835 ^
a6c8162 ^




a6c8162 ^
6f93835 ^
a6c8162 ^












b957093 ^


37142b5 ^
b957093 ^











37142b5 ^
b957093 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116