diff options
author | Sandro Santilli <strk@kbt.io> | 2017-02-26 04:58:02 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-26 11:58:02 +0800 |
commit | bf24099114d75dbc625bc8385a0a7d969d0c3748 (patch) | |
tree | 262eeafd90e9ba99315594dfa8088509a64853c2 /models/migrations/v20.go | |
parent | 80f900ebae5c52f736f667a81bbc1ab815344efc (diff) | |
download | gitea-bf24099114d75dbc625bc8385a0a7d969d0c3748.tar.gz gitea-bf24099114d75dbc625bc8385a0a7d969d0c3748.zip |
Allow migrating installations with no local avatars (#1056)
Diffstat (limited to 'models/migrations/v20.go')
-rw-r--r-- | models/migrations/v20.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/migrations/v20.go b/models/migrations/v20.go index 134a3d51e6..45d7e49ca8 100644 --- a/models/migrations/v20.go +++ b/models/migrations/v20.go @@ -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) |