From f312519d37afb6b84becc3da49328b2133553ab2 Mon Sep 17 00:00:00 2001 From: augushong Date: Fri, 28 Mar 2025 11:04:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=AE=BE=E7=BD=AEthink=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=BA=E5=BF=85=E9=80=89=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/base/admin/service/AdminUpdateServiceBase.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extend/base/admin/service/AdminUpdateServiceBase.php b/extend/base/admin/service/AdminUpdateServiceBase.php index 0057289..6291ab2 100644 --- a/extend/base/admin/service/AdminUpdateServiceBase.php +++ b/extend/base/admin/service/AdminUpdateServiceBase.php @@ -375,6 +375,16 @@ class AdminUpdateServiceBase } } + $required_file = [ + 'think' + ]; + + foreach ($required_file as $file) { + if($file == $file_path){ + return false; + } + } + // 如果file_path不存在目录分隔符,则是可选更新的文件(根目录下的文件) if (strpos($file_path, '/') === false) { return true;