* Fix bug#34051.
This commit is contained in:
@@ -15,7 +15,9 @@ class scm
|
||||
$className = $repo->SCM;
|
||||
if($className == 'Git') $className = 'GitRepo';
|
||||
if(!class_exists($className)) require(strtolower($className) . '.class.php');
|
||||
$this->engine = new $className($repo->client, $repo->path, $repo->account, $repo->password, $repo->encoding, $repo);
|
||||
$repoRoot = $repo->path;
|
||||
if('Subversion' == $className && !empty($repo->prefix)) $repoRoot = substr($repo->path, 0, strlen($repo->path) - strlen($repo->prefix));
|
||||
$this->engine = new $className($repo->client, $repoRoot, $repo->account, $repo->password, $repo->encoding, $repo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1036,7 +1036,7 @@ class repoModel extends model
|
||||
$file->repo = $repoID;
|
||||
$this->dao->insert(TABLE_REPOFILES)->data($file)->exec();
|
||||
|
||||
if($file->oldPath and $file->action == 'R')
|
||||
if($file->action == 'R' && !empty($file->oldPath))
|
||||
{
|
||||
$file->path = $file->oldPath;
|
||||
$file->parent = dirname($file->path);
|
||||
@@ -1100,7 +1100,7 @@ class repoModel extends model
|
||||
$repoFile->parent = $parentPath == '\\' ? '/' : $parentPath;
|
||||
$repoFile->type = $info['kind'];
|
||||
$repoFile->action = $info['action'];
|
||||
$repoFile->oldPath = $info['oldPath'];
|
||||
$repoFile->oldPath = empty($info['oldPath']) ? '' : $info['oldPath'];
|
||||
$this->dao->insert(TABLE_REPOFILES)->data($repoFile)->exec();
|
||||
|
||||
if($repoFile->oldPath and $repoFile->action == 'R')
|
||||
|
||||
Reference in New Issue
Block a user