Skip to content

Commit ec58717

Browse files
committed
Fix bug
1 parent 60c85e7 commit ec58717

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/repository/fork.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ func ForkRepository(ctx context.Context, doer, owner *user_model.User, opts Fork
122122
// last - clean up if something goes wrong
123123
defer func() {
124124
if err != nil {
125-
if errDelete := gitrepo.DeleteRepository(ctx, repo); errDelete != nil {
126-
log.Error("Failed to remove fork repo")
125+
if errDelete := DeleteRepositoryDirectly(ctx, doer, repo.ID); errDelete != nil {
126+
log.Error("Failed to remove fork repo: %v", errDelete)
127127
}
128128
}
129129
}()

0 commit comments

Comments
 (0)