mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-25 23:28:57 +00:00
Close the gitrepo when deleting the repository (#15876)
Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
1 parent
f6be429781
commit
d0ea10b21f
4 files changed
+14
No files matched your search
@@ -544,6 +544,11 @@ func SettingsPost(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Close the gitrepository before doing this.
|
||||
if ctx.Repo.GitRepo != nil {
|
||||
ctx.Repo.GitRepo.Close()
|
||||
}
|
||||
|
||||
if err := repo_service.DeleteRepository(ctx.User, ctx.Repo.Repository); err != nil {
|
||||
ctx.ServerError("DeleteRepository", err)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user