Branch: Tag:

2015-10-05

2015-10-05 12:53:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Filesystem.Monitor [Inotify]: Fixed calling of stable_data_change().

The calling of stable_data_change() got lost when accellerated paths
were removed from the polling heap.

845:    protected int wd = -1;    int `accellerated() { return wd != -1; }    +  protected void file_exists(string path, Stdio.Stat st) +  { +  ::file_exists(path, st); +  if ((last_change != 0x7fffffff) && (wd != -1)) { +  // Not stable yet. +  int t = time(1) - last_change; +  if (t < 0) t = 0; +  (backend || Pike.DefaultBackend)-> +  call_out(check, (stable_time || global::stable_time) + 1 - t); +  } +  } +  +  protected void file_created(string path, Stdio.Stat st) +  { +  if (wd != -1) { +  (backend || Pike.DefaultBackend)-> +  call_out(check, (stable_time || global::stable_time) + 1); +  } +  ::file_created(path, st); +  } +  +  protected void data_changed(string path, Stdio.Stat st) +  { +  if (wd != -1) { +  (backend || Pike.DefaultBackend)-> +  call_out(check, (stable_time || global::stable_time) + 1); +  } +  ::data_changed(path, st); +  } +     protected void register_path(int|void initial)    {    if (wd != -1) return;