mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-11 17:50:57 +00:00
parent
e8bac94d1f
commit
fbb424c61d
2 changed files with 11 additions and 8 deletions
|
@ -885,8 +885,10 @@ func deleteUser(e *xorm.Session, u *User) error {
|
|||
}
|
||||
|
||||
avatarPath := u.CustomAvatarPath()
|
||||
if err := os.Remove(avatarPath); err != nil {
|
||||
return fmt.Errorf("Fail to remove %s: %v", avatarPath, err)
|
||||
if com.IsExist(avatarPath) {
|
||||
if err := os.Remove(avatarPath); err != nil {
|
||||
return fmt.Errorf("Fail to remove %s: %v", avatarPath, err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue