pike.git / lib / modules / Filesystem.pmod / Monitor.pmod / basic.pike

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:750: Inside #if HAVE_EVENTSTREAM
     //! This function is called when the FSEvents EventStream detects a change   //! in one of the monitored directories.   protected void eventstream_callback(string path, int flags, int event_id)   {    MON_WERR("eventstream_callback(%O, 0x%08x, %O)\n", path, flags, event_id);    if(path[-1] == '/') path = path[0..<1];    MON_WERR("Normalized path: %O\n", path);       int monitor_flags; -  +     if (flags & System.FSEvents.kFSEventStreamEventFlagMustScanSubDirs) -  monitor_flags &= MF_RECURSE; +  monitor_flags |= MF_RECURSE;       int found;    string checkpath = path;    for (int i = 0; i <= 1; i++) {    MON_WERR("Looking up monitor for path %O.\n", checkpath);    if(Monitor m = monitors[checkpath]) {    MON_WERR("Found monitor %O for path %O.\n", m, checkpath);    m->check(monitor_flags);    found = 1;    break;