From bfb0e8ad4094b5f1aa80f71066b6ed90a4644fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 29 Mar 2021 15:53:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Process/ServerInotify.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 4529e28f..017650bc 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -47,6 +47,7 @@ class ServerInotify extends Process $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE; foreach ($this->dirs as $dir) { + if (!is_dir($dir)) continue; $this->watch($dir); } Event::add($this->inotify, [$this, 'check']); @@ -68,6 +69,9 @@ class ServerInotify extends Process if (is_bool($path = realpath($value))) { continue; } + + if (!is_dir($path)) continue; + $this->loadByDir($path, $isReload); } }