diff options
author | Mike Fellows <Mike.Fellows@shaw.ca> | 2017-11-04 14:36:49 -0700 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-11-04 23:36:49 +0200 |
commit | be523152a819f6edfb1a257f5cebcb36fc96fc14 (patch) | |
tree | d086da03ccfaeaa165c824df42f3f500e2b9312a /modules/setting | |
parent | d91fe5254da3d7137a139fd393b4bd2070e18b78 (diff) | |
download | gitea-be523152a819f6edfb1a257f5cebcb36fc96fc14.tar.gz gitea-be523152a819f6edfb1a257f5cebcb36fc96fc14.zip |
Clean repository ROOT directory name with filepath.Clean (#2846)
For better compatibility with Windows.
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index d22bb24f94..62d4d5eeb5 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -971,9 +971,9 @@ func NewContext() { RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gitea-repositories")) forcePathSeparator(RepoRootPath) if !filepath.IsAbs(RepoRootPath) { - RepoRootPath = path.Join(AppWorkPath, RepoRootPath) + RepoRootPath = filepath.Join(AppWorkPath, RepoRootPath) } else { - RepoRootPath = path.Clean(RepoRootPath) + RepoRootPath = filepath.Clean(RepoRootPath) } ScriptType = sec.Key("SCRIPT_TYPE").MustString("bash") if err = Cfg.Section("repository").MapTo(&Repository); err != nil { |