From 450e7894aa43fe6cc2ab44acfca81942e2f676e8 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Thu, 13 Dec 2018 16:36:39 +0200 Subject: [PATCH] File manager improvements --- application/Espo/Core/Utils/File/Manager.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/Espo/Core/Utils/File/Manager.php b/application/Espo/Core/Utils/File/Manager.php index eb0c39a481..941a115e10 100644 --- a/application/Espo/Core/Utils/File/Manager.php +++ b/application/Espo/Core/Utils/File/Manager.php @@ -466,6 +466,9 @@ class Manager if (file_exists($sourceFile) && is_file($sourceFile)) { $res &= copy($sourceFile, $destFile); + if (function_exists('opcache_invalidate')) { + opcache_invalidate($destFile); + } } } @@ -558,6 +561,9 @@ class Manager } if (file_exists($filePath) && is_file($filePath)) { + if (function_exists('opcache_invalidate')) { + opcache_invalidate($filePath, true); + } $result &= unlink($filePath); } }