From a9558f90d2d607ce64758f46f81168a0b5fefe79 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 24 Mar 2020 08:23:04 +0800 Subject: [PATCH] * change for zh-cn svn. --- lib/scm/subversion.class.php | 2 +- module/repo/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/scm/subversion.class.php b/lib/scm/subversion.class.php index 5eb5b3a63f..fca5841743 100644 --- a/lib/scm/subversion.class.php +++ b/lib/scm/subversion.class.php @@ -23,7 +23,7 @@ class Subversion public function __construct($client, $root, $account, $password, $encoding = 'UTF-8') { putenv('LC_CTYPE=en_US.UTF-8'); - $this->root = rtrim($root, DIRECTORY_SEPARATOR); + $this->root = str_replace(array('%3A', '%2F'), array(':', '/'), urlencode(rtrim($root, '/'))); $this->account = $account; $this->password = $password; $this->encoding = $encoding; diff --git a/module/repo/model.php b/module/repo/model.php index 171df57df7..083dff41f0 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -920,7 +920,7 @@ class repoModel extends model if($scm == 'Subversion') { - $path = '"' . $path . '"'; + $path = '"' . str_replace(array('%3A', '%2F'), array(':', '/'), urlencode($path)) . '"'; if(stripos($path, 'https://') === 1 or stripos($path, 'svn://') === 1) { $ssh = true;