1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

#1544 better tmp dir name for creating repo

This commit is contained in:
Unknwon
2015-09-03 04:44:20 -04:00
parent b6131793da
commit a7ee654646
2 changed files with 5 additions and 4 deletions

View File

@@ -610,8 +610,8 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts C
return err
}
tmpDir := filepath.Join(os.TempDir(), "gogs", repo.Name, com.ToStr(time.Now().Nanosecond()))
tmpDir := filepath.Join(os.TempDir(), "gogs-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond()))
fmt.Println(tmpDir)
// Initialize repository according to user's choice.
if opts.AutoInit {
os.MkdirAll(tmpDir, os.ModePerm)