summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-01-25 15:28:28 +0800
committerGitHub <noreply@github.com>2022-01-25 09:28:28 +0200
commit0734ca01323135d0171a6c69e25fe7046d3fa748 (patch)
treeef329084f82767fdf01021b4984dd6daf379f277 /services
parent0b83cc21be4b53de401e9c3ffca74ae3f003e55e (diff)
downloadgitea-0734ca01323135d0171a6c69e25fe7046d3fa748.tar.gz
gitea-0734ca01323135d0171a6c69e25fe7046d3fa748.zip
Fix restore without topic failure (#18387) (#18400)
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'services')
-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 357e995423..d7f3b76c2d 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
}