From 28d9305ea3b0c6a0294258d207e80053af4137d6 Mon Sep 17 00:00:00 2001 From: yasuokav Date: Fri, 25 Jan 2019 16:33:15 +0900 Subject: [PATCH] Fix delete correct temp directory (#5840) --- models/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/pull.go b/models/pull.go index cd21e494a..dee3b6381 100644 --- a/models/pull.go +++ b/models/pull.go @@ -366,7 +366,7 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository, mergeStyle return fmt.Errorf("Failed to create dir %s: %v", tmpBasePath, err) } - defer os.RemoveAll(path.Dir(tmpBasePath)) + defer os.RemoveAll(tmpBasePath) var stderr string if _, stderr, err = process.GetManager().ExecTimeout(5*time.Minute,