This commit is contained in:
2021-03-29 15:53:08 +08:00
parent 7aa303ea16
commit bfb0e8ad40
+4
View File
@@ -47,6 +47,7 @@ class ServerInotify extends Process
$this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE; $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE;
foreach ($this->dirs as $dir) { foreach ($this->dirs as $dir) {
if (!is_dir($dir)) continue;
$this->watch($dir); $this->watch($dir);
} }
Event::add($this->inotify, [$this, 'check']); Event::add($this->inotify, [$this, 'check']);
@@ -68,6 +69,9 @@ class ServerInotify extends Process
if (is_bool($path = realpath($value))) { if (is_bool($path = realpath($value))) {
continue; continue;
} }
if (!is_dir($path)) continue;
$this->loadByDir($path, $isReload); $this->loadByDir($path, $isReload);
} }
} }