forked from Shiloh/githaven
* bug fixed for org avatar caused by #1049 * use isfile only
This commit is contained in:
parent
a5ac4c64fc
commit
522f194983
@ -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 New Issue
Block a user