diff options
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 9d3fb7cfec..4670e01564 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -157,10 +157,11 @@ func (r *Repository) GetEditorconfig() (*editorconfig.Editorconfig, error) { if treeEntry.Blob().Size() >= setting.UI.MaxDisplayFileSize { return nil, git.ErrNotExist{ID: "", RelPath: ".editorconfig"} } - reader, err := treeEntry.Blob().Data() + reader, err := treeEntry.Blob().DataAsync() if err != nil { return nil, err } + defer reader.Close() data, err := ioutil.ReadAll(reader) if err != nil { return nil, err |