mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Allow migrating installations with no local avatars (#1056)
This commit is contained in:
committed by
Lunny Xiao
parent
80f900ebae
commit
bf24099114
@@ -21,6 +21,10 @@ import (
|
||||
func useNewNameAvatars(x *xorm.Engine) error {
|
||||
d, err := os.Open(setting.AvatarUploadPath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
// Nothing to do if AvatarUploadPath does not exist
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
names, err := d.Readdirnames(0)
|
||||
|
Reference in New Issue
Block a user