Skip to content

Commit

Permalink
Clean repository ROOT directory name with filepath.Clean
Browse files Browse the repository at this point in the history
For better compatibility with Windows.
  • Loading branch information
MCF committed Nov 4, 2017
1 parent dcb009a commit f659bc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f659bc6

Please sign in to comment.