Skip to content

Commit

Permalink
修复 Inotify 热更新问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Apr 26, 2020
1 parent 9ba83ff commit a5b4dbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/HotUpdate/Monitor/Inotify.php
Expand Up @@ -45,8 +45,9 @@ protected function init()
$this->handler = $handler = \inotify_init();
stream_set_blocking($handler, 0);

$excludePaths = &$this->excludePaths;
$excludeRule = &$this->excludeRule;
$excludeRule = implode('|', array_map('\Imi\Util\Imi::parseRule', $excludeRule));
$excludeRule = implode('|', array_map('\Imi\Util\Imi::parseRule', $excludePaths));
$paths = &$this->paths;
$mask = &$this->mask;
foreach($this->includePaths as $path)
Expand Down Expand Up @@ -74,7 +75,7 @@ protected function init()
foreach(File::enumFile($path) as $file)
{
$fullPath = $file->getFullPath();
foreach($excludeRule as $path)
foreach($excludePaths as $path)
{
if(substr($fullPath, 0, strlen($path)) === $path)
{
Expand Down

0 comments on commit a5b4dbb

Please sign in to comment.