#1544 Creating new repository fails occasionally

This commit is contained in:
Unknwon 2015-08-29 16:07:02 +08:00
parent 9ef063cbb0
commit a3683ca5d6
3 changed files with 5 additions and 19 deletions

View file

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