Skip to content

Commit 91b863b

Browse files
committed
Fixes issue go-gitea#283
Delete old temp local copy before we create a new temp local copy
1 parent bab737b commit 91b863b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/pull.go

+3
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,9 @@ func (pr *PullRequest) testPatch() (err error) {
429429

430430
log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath)
431431

432+
// Delete old temp local copy before we create a new temp local copy
433+
RemoveAllWithNotice("Deleting old local copy", pr.BaseRepo.LocalCopyPath())
434+
432435
if err := pr.BaseRepo.UpdateLocalCopyBranch(pr.BaseBranch); err != nil {
433436
return fmt.Errorf("UpdateLocalCopy: %v", err)
434437
}

0 commit comments

Comments
 (0)