FedericoCeratto / nim-fswatch

Nim wrapper for the fswatch library
GNU General Public License v3.0
8 stars 1 forks source link

Exception with (too many?) folders #3

Open geotre opened 4 years ago

geotre commented 4 years ago

Minimal reproduction:


import fswatch

var monitor = newMonitor(latency=0.01)
monitor.set_recursive true
monitor.add("test_files")

proc callback(eg: EventGroup) =
  for e in eg:
    echo "Event: ", e.kind

monitor.setCallback(callback)
monitor.start()

Create a folder containing some folders and run:

mkdir test_files
for i in `seq 10`; do mkdir "test_files/$i"; done
nim c -r test.nim

Yields this result:

Error: unhandled exception: index 101 not in 0 .. 100 [IndexError]