mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 09:51:39 -05:00
fix #1331
This commit is contained in:
parent
492d2dc112
commit
45adb9b7a3
1 changed files with 1 additions and 0 deletions
|
@ -456,6 +456,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe
|
||||||
// Clone to temprory path and do the init commit.
|
// Clone to temprory path and do the init commit.
|
||||||
tmpDir := filepath.Join(os.TempDir(), com.ToStr(time.Now().Nanosecond()))
|
tmpDir := filepath.Join(os.TempDir(), com.ToStr(time.Now().Nanosecond()))
|
||||||
os.MkdirAll(tmpDir, os.ModePerm)
|
os.MkdirAll(tmpDir, os.ModePerm)
|
||||||
|
defer os.RemoveAll(tmpDir)
|
||||||
|
|
||||||
_, stderr, err = process.Exec(
|
_, stderr, err = process.Exec(
|
||||||
fmt.Sprintf("initRepository(git clone): %s", repoPath),
|
fmt.Sprintf("initRepository(git clone): %s", repoPath),
|
||||||
|
|
Loading…
Reference in a new issue