summaryrefslogtreecommitdiffstats
path: root/services/migrations
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-01-25 10:44:12 +0800
committerGitHub <noreply@github.com>2022-01-25 10:44:12 +0800
commita717265e477a369568ca3439882b8bcb3b28b945 (patch)
treeff62b5189ff1c3dbd575d64cceaace22fa58919d /services/migrations
parent8053b60b4f2c23906cbc25b71cc09c216b9a5241 (diff)
downloadgitea-a717265e477a369568ca3439882b8bcb3b28b945.tar.gz
gitea-a717265e477a369568ca3439882b8bcb3b28b945.zip
Fix restore without topic failure (#18387)
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'services/migrations')
-rw-r--r--services/migrations/restore.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/migrations/restore.go b/services/migrations/restore.go
index 4499f78701..c927de0b2b 100644
--- a/services/migrations/restore.go
+++ b/services/migrations/restore.go
@@ -97,6 +97,9 @@ func (r *RepositoryRestorer) GetTopics() ([]string, error) {
bs, err := os.ReadFile(p)
if err != nil {
+ if os.IsNotExist(err) {
+ return nil, nil
+ }
return nil, err
}