mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08: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