mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 15:10:43 +02:00
Add abstraction layer to delete repository from disk (#33879)
Extract from #28966 Follow #33874
This commit is contained in:
1 parent
a0e0a30d23
commit
55cc649d3d
6 files changed
+37
-11
No files matched your search
@@ -116,7 +116,7 @@ func ForkRepository(ctx context.Context, doer, owner *user_model.User, opts Fork
|
||||
|
||||
// As the transaction will be failed and hence database changes will be destroyed we only need
|
||||
// to delete the related repository on the filesystem
|
||||
if errDelete := util.RemoveAll(repo.RepoPath()); errDelete != nil {
|
||||
if errDelete := gitrepo.DeleteRepository(ctx, repo); errDelete != nil {
|
||||
log.Error("Failed to remove fork repo")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user