From e0967b579f163eea1d7e92346ea8ec88acfeffcb Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Sun, 19 Jul 2020 18:42:54 -0700 Subject: [PATCH] * Finish task#7376. --- config/zentaopms.php | 2 +- module/repo/model.php | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 1b94bfc23c..9f0f6e84b9 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -23,7 +23,7 @@ $config->checkVersion = true; // Auto check for new version or not. /* Set the wide window size and timeout(ms) and duplicate interval time(s). */ $config->wideSize = 1400; $config->timeout = 30000; -$config->duplicateTime = 60; +$config->duplicateTime = 30; /* Product common list. */ $config->productCommonList['zh-cn'][0] = '产品'; diff --git a/module/repo/model.php b/module/repo/model.php index c6c37ce568..72400ab578 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -977,13 +977,14 @@ class repoModel extends model } elseif($scm == 'Git') { + if(!is_dir($path)) + { + dao::$errors['path'] = sprintf($this->lang->repo->error->noFile, $path); + return false; + } + if(!chdir($path)) { - if(!is_dir($path)) - { - dao::$errors['path'] = sprintf($this->lang->repo->error->noFile, $path); - return false; - } if(!is_executable($path)) { dao::$errors['path'] = sprintf($this->lang->repo->error->noPriv, $path);