Skip to content

Commit 522f194

Browse files
authored
Bug fixed for org avatar caused by #1049 (#1070)
* bug fixed for org avatar caused by #1049 * use isfile only
1 parent a5ac4c6 commit 522f194

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/user.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,12 @@ func (u *User) RelAvatarLink() string {
324324

325325
switch {
326326
case u.UseCustomAvatar:
327-
if !com.IsExist(u.CustomAvatarPath()) {
327+
if !com.IsFile(u.CustomAvatarPath()) {
328328
return defaultImgURL
329329
}
330330
return setting.AppSubURL + "/avatars/" + u.Avatar
331331
case setting.DisableGravatar, setting.OfflineMode:
332-
if !com.IsExist(u.CustomAvatarPath()) {
332+
if !com.IsFile(u.CustomAvatarPath()) {
333333
if err := u.GenerateRandomAvatar(); err != nil {
334334
log.Error(3, "GenerateRandomAvatar: %v", err)
335335
}

0 commit comments

Comments
 (0)