From 89c780e59a45524bbfe2ea313853d9aa87fd2d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 3 Sep 2020 01:30: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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/Process/ServerInotify.php b/system/Process/ServerInotify.php index d99509e8..6a9363d5 100644 --- a/system/Process/ServerInotify.php +++ b/system/Process/ServerInotify.php @@ -77,16 +77,17 @@ class ServerInotify extends Process $path = rtrim($path, '/'); foreach (glob($path . '/*') as $value) { $md5 = md5($value); - if (is_dir($value)) { $this->loadByDir($value); } if (!isset($this->md5Map[$md5])) { return $this->reload(); } - if ($this->md5Map[$md5] != filectime($value)) { + $mTime = filectime($value); + if ($this->md5Map[$md5] != $mTime) { return $this->reload(); } + $this->md5Map[$md5] = $mTime; } }