diff --git a/application/service/PluginsAdminService.php b/application/service/PluginsAdminService.php index feac2c22b68211c97f2d9267def86b997e62c9a5..74e5c813c3c300f33b391618dd0f819be817a00f 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 52411243b24786b783e857f7e69522da96548cd9..d39862952d1f19aaf61e69dd0f5c8338a7219299 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, '/'));