aboutsummaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-02-27 08:42:22 +0800
committerGitHub <noreply@github.com>2017-02-27 08:42:22 +0800
commit522f1949830fcf410b61497ee55162e676e1bdb6 (patch)
treef94253d2d5094e3bdb6cc9607f19cb87fd843651 /models/user.go
parenta5ac4c64fcf3de3d9441c241a07ce8610e3f399a (diff)
downloadgitea-522f1949830fcf410b61497ee55162e676e1bdb6.tar.gz
gitea-522f1949830fcf410b61497ee55162e676e1bdb6.zip
Bug fixed for org avatar caused by #1049 (#1070)
* bug fixed for org avatar caused by #1049 * use isfile only
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go
index e03506c312..67130d0131 100644
--- a/models/user.go
+++ b/models/user.go
@@ -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)
}