updated fsmonitor
This commit is contained in:
parent
02c076f9b4
commit
3fcf6f430d
1 changed files with 2 additions and 3 deletions
|
|
@ -96,7 +96,7 @@ proc add*(monitor: PFSMonitor, target: string,
|
||||||
|
|
||||||
result = inotifyAddWatch(monitor.fd, target, INFilter.uint32)
|
result = inotifyAddWatch(monitor.fd, target, INFilter.uint32)
|
||||||
if result < 0:
|
if result < 0:
|
||||||
OSError(OSLastError())
|
raiseOSError(osLastError())
|
||||||
monitor.targets.add(result, target)
|
monitor.targets.add(result, target)
|
||||||
|
|
||||||
proc del*(monitor: PFSMonitor, wd: cint) =
|
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)
|
let le = read(fd, addr(buffer[0]), size)
|
||||||
|
|
||||||
var movedFrom: TTable[cint, tuple[wd: cint, old: string]] =
|
var movedFrom = initTable[cint, tuple[wd: cint, old: string]]()
|
||||||
initTable[cint, tuple[wd: cint, old: string]]()
|
|
||||||
|
|
||||||
var i = 0
|
var i = 0
|
||||||
while i < le:
|
while i < le:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue