mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 09:43:11 +00: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 {
|
||||
case u.UseCustomAvatar:
|
||||
if !com.IsExist(u.CustomAvatarPath()) {
|
||||
if !com.IsFile(u.CustomAvatarPath()) {
|
||||
return defaultImgURL
|
||||
}
|
||||
return setting.AppSubURL + "/avatars/" + u.Avatar
|
||||
case setting.DisableGravatar, setting.OfflineMode:
|
||||
if !com.IsExist(u.CustomAvatarPath()) {
|
||||
if !com.IsFile(u.CustomAvatarPath()) {
|
||||
if err := u.GenerateRandomAvatar(); err != nil {
|
||||
log.Error(3, "GenerateRandomAvatar: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue