Watcher plugin fixes
* com.noccy.watcher: Initial inotify support * ScriptRunner now accepts an array of local vars for expansion when evaluating scripts
This commit is contained in:
@ -60,12 +60,13 @@ class MtimeMonitor implements MonitorInterface
|
||||
}
|
||||
|
||||
foreach ($check as $path) {
|
||||
if (!file_exists($path)) continue;
|
||||
if (empty($this->watched[$path])) {
|
||||
$this->watched[$path] = filemtime($path);
|
||||
} else {
|
||||
$mtime = filemtime($path);
|
||||
if ($mtime > $this->watched[$path]) {
|
||||
printf("* modified: %s (%s)\n", $path, $rule->getName());
|
||||
printf("~ modified: %s (%s)\n", $path, $rule->getName());
|
||||
$this->watched[$path] = $mtime;
|
||||
if (!in_array($rule, $this->modified)) {
|
||||
$this->modified[] = $rule;
|
||||
|
Reference in New Issue
Block a user