mirror of
https://github.com/go-gitea/gitea
synced 2024-11-29 00:58:05 +01:00
* bug fixed for org avatar caused by #1049 * use isfile only
This commit is contained in:
parent
a5ac4c64fc
commit
522f194983
1 changed files with 2 additions and 2 deletions
|
@ -324,12 +324,12 @@ func (u *User) RelAvatarLink() string {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case u.UseCustomAvatar:
|
case u.UseCustomAvatar:
|
||||||
if !com.IsExist(u.CustomAvatarPath()) {
|
if !com.IsFile(u.CustomAvatarPath()) {
|
||||||
return defaultImgURL
|
return defaultImgURL
|
||||||
}
|
}
|
||||||
return setting.AppSubURL + "/avatars/" + u.Avatar
|
return setting.AppSubURL + "/avatars/" + u.Avatar
|
||||||
case setting.DisableGravatar, setting.OfflineMode:
|
case setting.DisableGravatar, setting.OfflineMode:
|
||||||
if !com.IsExist(u.CustomAvatarPath()) {
|
if !com.IsFile(u.CustomAvatarPath()) {
|
||||||
if err := u.GenerateRandomAvatar(); err != nil {
|
if err := u.GenerateRandomAvatar(); err != nil {
|
||||||
log.Error(3, "GenerateRandomAvatar: %v", err)
|
log.Error(3, "GenerateRandomAvatar: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue