summaryrefslogtreecommitdiffstats
path: root/routers/repo/view.go
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2016-11-03 20:45:16 -0200
committerAndrey Nering <andrey.nering@gmail.com>2016-11-05 13:33:41 -0200
commit984fa8d83b403baf1b72ec0e9e98a6c700aabf9d (patch)
tree9e46493bae6874cd90f55c1a2b45bc72b1aa1484 /routers/repo/view.go
parentab12596143be6e8c587eda1ffe1a621bf69282bd (diff)
downloadgitea-984fa8d83b403baf1b72ec0e9e98a6c700aabf9d.tar.gz
gitea-984fa8d83b403baf1b72ec0e9e98a6c700aabf9d.zip
Fix 500 when repo has invalid .editorconfig
Creating a notice instead
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r--routers/repo/view.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 3bb551f2e0..ee49d4da15 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -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)