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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user