aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--models/repo.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index c61bef2f..73807a2f 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -456,6 +456,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe
// Clone to temprory path and do the init commit.
tmpDir := filepath.Join(os.TempDir(), com.ToStr(time.Now().Nanosecond()))
os.MkdirAll(tmpDir, os.ModePerm)
+ defer os.RemoveAll(tmpDir)
_, stderr, err = process.Exec(
fmt.Sprintf("initRepository(git clone): %s", repoPath),