diff --git a/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike b/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike index 9b937f2adf1f0e6c429eb39083b407ca1af9949c..92b0a5f8a47aaa8333843617ff23c1b2fd4fcc51 100644 --- a/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike +++ b/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike @@ -754,6 +754,23 @@ protected class Monitor(string path, update(st); return 1; } +#ifdef HAVE_EVENTSTREAM + else if(orig_flags & MF_RECURSE) + { + // if using FSEvents, we won't receive the name of the file changed, + // so we have to scan for it. + int caught; + array(string) files = get_dir(path) || ({}); + this_program::files = files; + foreach(files, string file) { + file = canonic_path(Stdio.append_path(path, file)); + if (monitors[file]) { + if(check_monitor(monitors[file])) caught = 1; + } + } + return caught; + } +#endif /* HAVE_EVENTSTREAM */ return 0; } }