0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-26 14:12:58 +01:00
This commit is contained in:
Unknwon 2015-07-31 14:05:36 +08:00
parent eea9302d8f
commit c44e1c7ca9

View file

@ -486,7 +486,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe
} }
} else if com.IsSliceContainsStr(Gitignores, repoLang) { } else if com.IsSliceContainsStr(Gitignores, repoLang) {
if err = ioutil.WriteFile(targetPath, if err = ioutil.WriteFile(targetPath,
bindata.MustAsset(path.Join("conf/gitignore", repoLang)), os.ModePerm); err != nil { bindata.MustAsset(path.Join("conf/gitignore", repoLang)), 0644); err != nil {
return fmt.Errorf("generate gitignore: %v", err) return fmt.Errorf("generate gitignore: %v", err)
} }
} else { } else {
@ -502,7 +502,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe
} }
} else if com.IsSliceContainsStr(Licenses, license) { } else if com.IsSliceContainsStr(Licenses, license) {
if err = ioutil.WriteFile(targetPath, if err = ioutil.WriteFile(targetPath,
bindata.MustAsset(path.Join("conf/license", license)), os.ModePerm); err != nil { bindata.MustAsset(path.Join("conf/license", license)), 0644); err != nil {
return fmt.Errorf("generate license: %v", err) return fmt.Errorf("generate license: %v", err)
} }
} else { } else {