From c4c4a8aa6847eec3fbf79d49f50623a8a9b6b398 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Thu, 14 Feb 2019 12:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=AE=A1=E7=90=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/PluginsAdminService.php | 10 +++++++++- application/service/ThemeService.php | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/application/service/PluginsAdminService.php b/application/service/PluginsAdminService.php index feac2c22b..74e5c813c 100644 --- a/application/service/PluginsAdminService.php +++ b/application/service/PluginsAdminService.php @@ -918,18 +918,26 @@ php; if(strpos($file, '/.') === false && strpos($file, '__') === false) { // 文件包对应系统所在目录 + $is_has_find = false; foreach($dir_list as $dir_key=>$dir_value) { if(strpos($file, $dir_key) !== false) { $file = str_replace($dir_key.'/', '', $dir_value.$file); + $is_has_find = true; break; } } + // 没有匹配到则指定目录跳过 + if($is_has_find == false) + { + continue; + } + // 截取文件路径 $file_path = substr($file, 0, strrpos($file, '/')); - + // 路径不存在则创建 \base\FileUtil::CreateDir($file_path); diff --git a/application/service/ThemeService.php b/application/service/ThemeService.php index 52411243b..d39862952 100755 --- a/application/service/ThemeService.php +++ b/application/service/ThemeService.php @@ -135,15 +135,23 @@ class ThemeService if(strpos($file, '/.') === false && strpos($file, '__') === false) { // 文件包对应系统所在目录 + $is_has_find = false; foreach($dir_list as $dir_key=>$dir_value) { if(strpos($file, $dir_key) !== false) { $file = str_replace($dir_key.'/', '', $dir_value.$file); + $is_has_find = true; break; } } + // 没有匹配到则指定目录跳过 + if($is_has_find == false) + { + continue; + } + // 截取文件路径 $file_path = substr($file, 0, strrpos($file, '/')); -- GitLab