From c44e1c7ca97ba53c23b253687bc6cb4b545d3173 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 31 Jul 2015 14:05:36 +0800 Subject: [PATCH] fix #1208 --- models/repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/repo.go b/models/repo.go index 55accfaf..a2b29ff3 100644 --- a/models/repo.go +++ b/models/repo.go @@ -486,7 +486,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe } } else if com.IsSliceContainsStr(Gitignores, repoLang) { 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) } } else { @@ -502,7 +502,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe } } else if com.IsSliceContainsStr(Licenses, license) { 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) } } else {