From a85bf1af4c8a54658fa6ff8f9e6bc150b2033643 Mon Sep 17 00:00:00 2001 From: liyuchun <563917701@qq.com> Date: Fri, 2 Sep 2022 14:39:49 +0800 Subject: [PATCH] * Fix bug when save commit. --- module/repo/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/repo/model.php b/module/repo/model.php index 9fa9cc3340..799436cefa 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -935,7 +935,7 @@ class repoModel extends model $file->repo = $repoID; $this->dao->insert(TABLE_REPOFILES)->data($file)->exec(); - if($file->oldPath) + if($file->oldPath and $file->action == 'R') { $file->path = $file->oldPath; $file->parent = dirname($file->path); @@ -1002,7 +1002,7 @@ class repoModel extends model $repoFile->oldPath = $info['oldPath']; $this->dao->insert(TABLE_REPOFILES)->data($repoFile)->exec(); - if($repoFile->oldPath) + if($repoFile->oldPath and $file->action == 'R') { $parentPath = dirname($repoFile->oldPath);