diff --git a/extend/base/admin/service/AdminUpdateServiceBase.php b/extend/base/admin/service/AdminUpdateServiceBase.php index 5910a72..9d19b95 100644 --- a/extend/base/admin/service/AdminUpdateServiceBase.php +++ b/extend/base/admin/service/AdminUpdateServiceBase.php @@ -175,10 +175,10 @@ class AdminUpdateServiceBase foreach ($changed_files as $file_path => $type) { if ($type == 'add') { - // 最新版本有,但是现存版本没有,有可能是新版本增加的,也有可能是用户删除的 if ($this->testIsOptionalFiles($file_path)) { + // 最新版本有,但是现存版本没有,有可能是新版本增加的,也有可能是用户删除的 // 判断是否是新版本增加的 - if (in_array($file_path, $current_version_files)) { + if (!in_array($file_path, $current_version_files)) { // 如果是新版本增加的,则直接处理 $need_process_files[$file_path] = $type; continue; @@ -196,7 +196,6 @@ class AdminUpdateServiceBase if ($type == 'delete') { if ($this->testIsOptionalFiles($file_path)) { // 最新版本没有,但是现存版本有,有可能是新版本删除的,也有可能是用户增加的 - if (in_array($file_path, $current_version_files)) { // 如果这个文件在当前版本中存在,则是新版本删除的,提示用户处理,因为用户改动了他,可能不希望被删除 $optional_update_waring_files[$file_path] = $type; @@ -235,7 +234,7 @@ class AdminUpdateServiceBase continue; } - // 如果当前代码 和 当前版本 一致 + // 如果当前代码 和 当前版本 一致,则直接处理 $need_process_files[$file_path] = $type; continue; }