Skip to content
Snippets Groups Projects
Commit 1d68b399 authored by Bill Welliver's avatar Bill Welliver
Browse files

Filesystem.Monitor: generate data change events properly when using FSEvents.

parent cd7f239a
No related branches found
No related tags found
No related merge requests found
...@@ -754,6 +754,23 @@ protected class Monitor(string path, ...@@ -754,6 +754,23 @@ protected class Monitor(string path,
update(st); update(st);
return 1; 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; return 0;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment