From 360765a94a7ad8e80cb16fc2b9c262db8dd23bb9 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 2 Jan 2024 13:28:18 +0200 Subject: [PATCH] invalidate opcache on dire removal --- application/Espo/Core/Utils/File/Manager.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/Espo/Core/Utils/File/Manager.php b/application/Espo/Core/Utils/File/Manager.php index 2b1045e3f2..820e397c18 100644 --- a/application/Espo/Core/Utils/File/Manager.php +++ b/application/Espo/Core/Utils/File/Manager.php @@ -804,6 +804,7 @@ class Manager $result = true; + // @todo Remove the if statement. if (is_array($fileList)) { foreach ($fileList as $file) { $fullPath = Util::concatPath($path, $file); @@ -812,6 +813,8 @@ class Manager $result &= $this->removeInDir($fullPath, true); } else if (file_exists($fullPath)) { + $this->opcacheInvalidate($fullPath, true); + $result &= unlink($fullPath); } }