From 3fcf6f430d4898bef292b33cd824893e81044298 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 17 Sep 2014 23:13:58 +0200 Subject: updated fsmonitor --- lib/pure/fsmonitor.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/pure') diff --git a/lib/pure/fsmonitor.nim b/lib/pure/fsmonitor.nim index cfee8d0ea..bf4aef61c 100644 --- a/lib/pure/fsmonitor.nim +++ b/lib/pure/fsmonitor.nim @@ -96,7 +96,7 @@ proc add*(monitor: PFSMonitor, target: string, result = inotifyAddWatch(monitor.fd, target, INFilter.uint32) if result < 0: - OSError(OSLastError()) + raiseOSError(osLastError()) monitor.targets.add(result, target) proc del*(monitor: PFSMonitor, wd: cint) = @@ -113,8 +113,7 @@ proc getEvent(m: PFSMonitor, fd: cint): seq[TMonitorEvent] = let le = read(fd, addr(buffer[0]), size) - var movedFrom: TTable[cint, tuple[wd: cint, old: string]] = - initTable[cint, tuple[wd: cint, old: string]]() + var movedFrom = initTable[cint, tuple[wd: cint, old: string]]() var i = 0 while i < le: -- cgit 1.4.1-2-gfad0