1
0
Fork 0
forked from forgejo/forgejo

Fix 500 when repo has invalid .editorconfig

Creating a notice instead
This commit is contained in:
Andrey Nering 2016-11-03 20:45:16 -02:00
parent ab12596143
commit 984fa8d83b
4 changed files with 31 additions and 16 deletions

View file

@ -245,12 +245,10 @@ func Home(ctx *context.Context) {
return
}
ec, err := ctx.Repo.GetEditorconfig()
if err != nil && !git.IsErrNotExist(err) {
ctx.Handle(500, "Repo.GetEditorconfig", err)
setEditorconfigIfExists(ctx)
if ctx.Written() {
return
}
ctx.Data["Editorconfig"] = ec
var treeNames []string
paths := make([]string, 0, 5)