summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-09-01 12:36:26 -0400
committerUnknwon <u@gogs.io>2016-09-01 12:36:26 -0400
commitc50d59874d88150081f5fec6b385cfdf4eb3ed84 (patch)
tree2922c16ca417647b7583b4453f923c30108a4dcd /models
parentb3d9ca4ccd7c4353db0971b61bbcbffd126cb61d (diff)
downloadgitea-c50d59874d88150081f5fec6b385cfdf4eb3ed84.tar.gz
gitea-c50d59874d88150081f5fec6b385cfdf4eb3ed84.zip
#3577 incorrect URL produced by AvatarLink
Diffstat (limited to 'models')
-rw-r--r--models/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go
index ef769de655..946c6c94d4 100644
--- a/models/user.go
+++ b/models/user.go
@@ -271,7 +271,7 @@ func (u *User) RelAvatarLink() string {
func (u *User) AvatarLink() string {
link := u.RelAvatarLink()
if link[0] == '/' && link[1] != '/' {
- return setting.AppUrl + link[1:]
+ return setting.AppUrl + strings.TrimPrefix(link, setting.AppSubUrl)[1:]
}
return link
}