diff options
author | zeripath <art27@cantab.net> | 2021-05-14 21:19:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 21:19:38 +0100 |
commit | d0ea10b21fb252c4f82a193b62a776e482e4bdfb (patch) | |
tree | 6cded84ee822eec2faf916e7b3d4f765190c4f4c /modules/migrations | |
parent | f6be429781b24b1ac3b6e719b9c64df33866db93 (diff) | |
download | gitea-d0ea10b21fb252c4f82a193b62a776e482e4bdfb.tar.gz gitea-d0ea10b21fb252c4f82a193b62a776e482e4bdfb.zip |
Close the gitrepo when deleting the repository (#15876)
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/migrations')
-rw-r--r-- | modules/migrations/gitea_uploader.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/migrations/gitea_uploader.go b/modules/migrations/gitea_uploader.go index bd6084d6a1..29118fd51b 100644 --- a/modules/migrations/gitea_uploader.go +++ b/modules/migrations/gitea_uploader.go @@ -851,6 +851,7 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { // Rollback when migrating failed, this will rollback all the changes. func (g *GiteaLocalUploader) Rollback() error { if g.repo != nil && g.repo.ID > 0 { + g.gitRepo.Close() if err := models.DeleteRepository(g.doer, g.repo.OwnerID, g.repo.ID); err != nil { return err } |