summary refs log tree commit diff stats
path: root/lib/pure/fsmonitor.nim
diff options
context:
space:
mode:
authorOscar Campbell <oscar@campbell.nu>2015-06-07 13:16:08 +0200
committerOscar Campbell <oscar@campbell.nu>2015-06-07 13:16:08 +0200
commit858cdd0b05df4846fb40a3263f05e54438995e99 (patch)
tree939fb5e27650e4e7a24698b3c3dac5acada396b1 /lib/pure/fsmonitor.nim
parent87a6d08e95c940775577c8f2bc5a74408c956a89 (diff)
parentbbb1bdb4a939aa43ed981acc2f96bce918be7d21 (diff)
downloadNim-858cdd0b05df4846fb40a3263f05e54438995e99.tar.gz
Merge remote-tracking branch 'upstream/devel' into devel
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.