Skip to content

Commit

Permalink
refactor: remove redundant slash. (go-gitea#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy authored and lunny committed Mar 3, 2017
1 parent c1d5983 commit 0afab87
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,7 @@ please consider changing to GITEA_CUSTOM`)
sec := Cfg.Section("server")
AppName = Cfg.Section("").Key("APP_NAME").MustString("Gitea: Git with a cup of tea")
AppURL = sec.Key("ROOT_URL").MustString("http://localhost:3000/")
if AppURL[len(AppURL)-1] != '/' {
AppURL += "/"
}
AppURL = strings.TrimRight(AppURL, "/") + "/"

// Check if has app suburl.
url, err := url.Parse(AppURL)
Expand Down

0 comments on commit 0afab87

Please sign in to comment.